Skip to main content

Strings

EndsWith

x.EndsWith(needle) -> boolean

Returns true if the string ends with the specified substring, otherwise false. If either or both parameters are nullish, returns false.

FormatWithDecimals

x.FormatWithDecimals(digits) -> string

Returns a string representation of the number with the specified number of decimal places. If digits is nullish, returns the number as a string with zero decimal places. If x is nullish, returns undefined.

FormatWithPrecision

x.FormatWithPrecision(precision) -> string

Returns a string representation of the number with the specified number of significant digits. If precision is nullish, returns the number as a string with 3 significant digits. If x is nullish, returns undefined.

Join

collection.Join(separator?) -> string

Returns a string that is the result of concatenating the elements of the collection with the specified separator. If collection is nullish, returns undefined. If separator is nullish, returns the elements of the collection concatenated with a comma and a space (, ).

LineBreak

LineBreak -> string

Returns a string containing a single line break character.

Split

x.Split(separator) -> array

Returns an array of strings that are the result of splitting the string at each occurrence of the specified separator. If x is nullish, returns undefined. If separator is nullish, no splitting occurs, and so an array containing the original string is returned.

StartsWith

x.StartsWith(needle) -> boolean

Returns true if the string starts with the specified substring, otherwise false. If either or both parameters are nullish, returns undefined.

Substring

string.Substring(from, length) -> string

Returns a string that is the result of removing the specified number of characters from the beginning of the string. If any parameter is nullish, returns undefined.

SubstringFrom

string.SubstringFrom(from) -> string

Returns a string that is the result of removing the specified number of characters from the beginning of the string. If either parameter is nullish, returns undefined.