the length of the common prefix of the two strings.
the length of the common suffix of the two strings.
Returns true if str contains any Unicode character that is classified as "R" or "AL".
Returns true if str contains unusual line terminators, like LS or PS
Counts how often character occurs inside value.
A manual decoding of a UTF8 string. Use only in environments which do not offer native conversion methods!
A manual encoding of str to UTF8.
Use only in environments which do not offer native conversion methods!
Converts HTML characters inside the string to use entities instead. Makes the string safe from being used e.g. in HTMLElement.innerHTML.
Escapes regular expression characters in a given string
Returns first index of the string that is not whitespace. If string is empty or contains only whitespaces, returns -1
Helper to produce a string with a variable number of arguments. Insert variable segments into the string using the {n} notation where N is the index of the argument following the string.
string to which formatting is applied
replacements for {n}-entries
Checks if the characters of the provided query string are included in the target string. The characters do not have to be contiguous within the string.
Returns the leading whitespace of the string. If the string contains only whitespaces, returns entire string
get the code point that begins at offset offset
Returns true if str contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \n, \r, \t
A fast function (therefore imprecise) to check if code points are emojis. Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-emoji-test.js
Returns last index of the string that is not whitespace. If string is empty or contains only whitespaces, returns -1
Given a string and a max length returns a shorted version. Shorting happens at favorable positions - such as whitespace or punctuation characters.
Removes all occurrences of needle from the beginning of haystack.
string to trim
the thing to trim
Removes all occurrences of needle from the end of haystack.
string to trim
the thing to trim
Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc.
Removes all occurrences of needle from the beginning and end of haystack.
string to trim
the thing to trim (default is a blank)
Generated using TypeDoc