[Library | Trunk]: Add capitalize function on string utils

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57926 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-12-20 11:03:48 +00:00
parent e955a799e5
commit 00fc8806c8
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ export class StringUtils{
const sliced = String(mystr).substr(0, size);
return sliced + (String(mystr).length > size ? '...' : '');
}
public static capitalize(value: string): string {
return value.charAt(0).toUpperCase() + value.slice(1);
}
public static URLSegmentsToPath(segments: UrlSegment[]): string {
let path = '';