Class: StringUtils
Defined in: src/sdk/utils/strings/StringUtils.ts:2
Collection of string utility functions.
Constructors
Constructor
new StringUtils():
StringUtils
Returns
StringUtils
Properties
DEGREE
readonlystaticDEGREE:"°"='°'
Defined in: src/sdk/utils/strings/StringUtils.ts:4
DIRECT_TO
readonlystaticDIRECT_TO:"Ð"='Ð'
Defined in: src/sdk/utils/strings/StringUtils.ts:3
DOWN_POINTING_TRIANGLE_CENTRED
readonlystaticDOWN_POINTING_TRIANGLE_CENTRED:"⯆"='⯆'
Defined in: src/sdk/utils/strings/StringUtils.ts:13
EN_DASH
readonlystaticEN_DASH:"–"='–'
Defined in: src/sdk/utils/strings/StringUtils.ts:5
LEFT_POINTING_ISOSCELES_RIGHT_TRIANGLE
readonlystaticLEFT_POINTING_ISOSCELES_RIGHT_TRIANGLE:"🞀"='🞀'
Defined in: src/sdk/utils/strings/StringUtils.ts:9
LEFT_POINTING_TRIANGLE_CENTRED
readonlystaticLEFT_POINTING_TRIANGLE_CENTRED:"⯇"='⯇'
Defined in: src/sdk/utils/strings/StringUtils.ts:11
RIGHT_POINTING_ISOSCELES_RIGHT_TRIANGLE
readonlystaticRIGHT_POINTING_ISOSCELES_RIGHT_TRIANGLE:"🞂"='🞂'
Defined in: src/sdk/utils/strings/StringUtils.ts:8
RIGHT_POINTING_TRIANGLE_CENTRED
readonlystaticRIGHT_POINTING_TRIANGLE_CENTRED:"⯈"='⯈'
Defined in: src/sdk/utils/strings/StringUtils.ts:10
UP_POINTING_TRIANGLE_CENTRED
readonlystaticUP_POINTING_TRIANGLE_CENTRED:"⯅"='⯅'
Defined in: src/sdk/utils/strings/StringUtils.ts:12
ZERO_WIDTH_DECIMAL
readonlystaticZERO_WIDTH_DECIMAL:"·"='·'
Defined in: src/sdk/utils/strings/StringUtils.ts:6
Methods
trimEnd()
statictrimEnd(str):string
Defined in: src/sdk/utils/strings/StringUtils.ts:55
Removes trailing whitespace and line terminator characters from a string.
Parameters
| Parameter | Type | Description |
|---|---|---|
str | string | The string to trim. |
Returns
string
A new string representing str with all trailing whitespace and line terminator characters removed.
trimStart()
statictrimStart(str):string
Defined in: src/sdk/utils/strings/StringUtils.ts:46
Removes leading whitespace and line terminator characters from a string.
Parameters
| Parameter | Type | Description |
|---|---|---|
str | string | The string to trim. |
Returns
string
A new string representing str with all leading whitespace and line terminator characters removed.
useZeroSlash()
staticuseZeroSlash(text):string
Defined in: src/sdk/utils/strings/StringUtils.ts:27
Replaces all '0' characters in a string with the slashed zero character.
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | The string to convert. |
Returns
string
A string identical to the input string except with all '0' characters converted to the slashed zero
character.
useZeroWidthDecimal()
staticuseZeroWidthDecimal(text):string
Defined in: src/sdk/utils/strings/StringUtils.ts:37
Replaces all '.' characters in a string with the zero width decimal character.
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | The string to convert. |
Returns
string
A string identical to the input string except with all '.' characters converted to the zero width decimal
character.