src/app/services/string-ex/string-ex.service.ts
String processing utility functions service
Methods |
|
Static acronym | ||||||||
acronym(value: string)
|
||||||||
Acronym.
Parameters :
Returns :
string
The acronym. |
Static capitalize | ||||||||
capitalize(str: string)
|
||||||||
Capitalize a string to title case.
Parameters :
Returns :
string
The string capitalized. |
Static glyph | ||||||||
glyph(value: string)
|
||||||||
Glyph.
Parameters :
Returns :
string
The glyph. |
Static replaceAll | ||||||||||||||||
replaceAll(str: string, search: string | RegExp, replacement: any)
|
||||||||||||||||
Replace all occurrences of a string within another string with a third string.
Parameters :
Returns :
string
String having all occurrences of the search string replaced with a replacement string. |
Static shorten | ||||||||
shorten(str: string)
|
||||||||
Shortens a long caption.
Parameters :
Returns :
string
A shortened caption. |
Static snakeCase | ||||||||
snakeCase(value: string)
|
||||||||
Replaces separators with underscores.
Parameters :
Returns :
string
The processed string. |
Static toPascalCase | ||||||||
toPascalCase(str: string | undefined)
|
||||||||
Convert a string to Pascal case.
Parameters :
Returns :
string
The string converted into Pascal case. |
Static toTitleCase | ||||||||
toTitleCase(str: string | undefined)
|
||||||||
Convert a string to title case.
Parameters :
Returns :
string
The string converted into title case. |