Skip to main content

Class: StringUtils

Collection of string utility functions.

Constructors

constructor

new StringUtils(): StringUtils

Returns

StringUtils

Properties

DEGREE

Static Readonly DEGREE: "°"

Defined in

src/sdk/utils/strings/StringUtils.ts:4


DIRECT_TO

Static Readonly DIRECT_TO: "Ð"

Defined in

src/sdk/utils/strings/StringUtils.ts:3


DOWN_POINTING_TRIANGLE_CENTRED

Static Readonly DOWN_POINTING_TRIANGLE_CENTRED: "⯆"

Defined in

src/sdk/utils/strings/StringUtils.ts:13


EN_DASH

Static Readonly EN_DASH: "–"

Defined in

src/sdk/utils/strings/StringUtils.ts:5


LEFT_POINTING_ISOSCELES_RIGHT_TRIANGLE

Static Readonly LEFT_POINTING_ISOSCELES_RIGHT_TRIANGLE: "🞀"

Defined in

src/sdk/utils/strings/StringUtils.ts:9


LEFT_POINTING_TRIANGLE_CENTRED

Static Readonly LEFT_POINTING_TRIANGLE_CENTRED: "⯇"

Defined in

src/sdk/utils/strings/StringUtils.ts:11


RIGHT_POINTING_ISOSCELES_RIGHT_TRIANGLE

Static Readonly RIGHT_POINTING_ISOSCELES_RIGHT_TRIANGLE: "🞂"

Defined in

src/sdk/utils/strings/StringUtils.ts:8


RIGHT_POINTING_TRIANGLE_CENTRED

Static Readonly RIGHT_POINTING_TRIANGLE_CENTRED: "⯈"

Defined in

src/sdk/utils/strings/StringUtils.ts:10


UP_POINTING_TRIANGLE_CENTRED

Static Readonly UP_POINTING_TRIANGLE_CENTRED: "⯅"

Defined in

src/sdk/utils/strings/StringUtils.ts:12


ZERO_WIDTH_DECIMAL

Static Readonly ZERO_WIDTH_DECIMAL: "·"

Defined in

src/sdk/utils/strings/StringUtils.ts:6

Methods

trimEnd

trimEnd(str): string

Removes trailing whitespace and line terminator characters from a string.

Parameters

NameTypeDescription
strstringThe string to trim.

Returns

string

A new string representing str with all trailing whitespace and line terminator characters removed.

Defined in

src/sdk/utils/strings/StringUtils.ts:55


trimStart

trimStart(str): string

Removes leading whitespace and line terminator characters from a string.

Parameters

NameTypeDescription
strstringThe string to trim.

Returns

string

A new string representing str with all leading whitespace and line terminator characters removed.

Defined in

src/sdk/utils/strings/StringUtils.ts:46


useZeroSlash

useZeroSlash(text): string

Replaces all '0' characters in a string with the slashed zero character.

Parameters

NameTypeDescription
textstringThe string to convert.

Returns

string

A string identical to the input string except with all '0' characters converted to the slashed zero character.

Defined in

src/sdk/utils/strings/StringUtils.ts:27


useZeroWidthDecimal

useZeroWidthDecimal(text): string

Replaces all '.' characters in a string with the zero width decimal character.

Parameters

NameTypeDescription
textstringThe string to convert.

Returns

string

A string identical to the input string except with all '.' characters converted to the zero width decimal character.

Defined in

src/sdk/utils/strings/StringUtils.ts:37