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
readonly
static
DEGREE:"°"
='°'
Defined in: src/sdk/utils/strings/StringUtils.ts:4
DIRECT_TO
readonly
static
DIRECT_TO:"Ð"
='Ð'
Defined in: src/sdk/utils/strings/StringUtils.ts:3
DOWN_POINTING_TRIANGLE_CENTRED
readonly
static
DOWN_POINTING_TRIANGLE_CENTRED:"⯆"
='⯆'
Defined in: src/sdk/utils/strings/StringUtils.ts:13
EN_DASH
readonly
static
EN_DASH:"–"
='–'
Defined in: src/sdk/utils/strings/StringUtils.ts:5
LEFT_POINTING_ISOSCELES_RIGHT_TRIANGLE
readonly
static
LEFT_POINTING_ISOSCELES_RIGHT_TRIANGLE:"🞀"
='🞀'
Defined in: src/sdk/utils/strings/StringUtils.ts:9
LEFT_POINTING_TRIANGLE_CENTRED
readonly
static
LEFT_POINTING_TRIANGLE_CENTRED:"⯇"
='⯇'
Defined in: src/sdk/utils/strings/StringUtils.ts:11
RIGHT_POINTING_ISOSCELES_RIGHT_TRIANGLE
readonly
static
RIGHT_POINTING_ISOSCELES_RIGHT_TRIANGLE:"🞂"
='🞂'
Defined in: src/sdk/utils/strings/StringUtils.ts:8
RIGHT_POINTING_TRIANGLE_CENTRED
readonly
static
RIGHT_POINTING_TRIANGLE_CENTRED:"⯈"
='⯈'
Defined in: src/sdk/utils/strings/StringUtils.ts:10
UP_POINTING_TRIANGLE_CENTRED
readonly
static
UP_POINTING_TRIANGLE_CENTRED:"⯅"
='⯅'
Defined in: src/sdk/utils/strings/StringUtils.ts:12
ZERO_WIDTH_DECIMAL
readonly
static
ZERO_WIDTH_DECIMAL:"·"
='·'
Defined in: src/sdk/utils/strings/StringUtils.ts:6
Methods
trimEnd()
static
trimEnd(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()
static
trimStart(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()
static
useZeroSlash(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()
static
useZeroWidthDecimal(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.