[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:
parent
e955a799e5
commit
00fc8806c8
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in New Issue