(str: string): number Returns the count of graphemes in a string, the individually rendered characters.
str
stringreturns
number 12 declarations
(str: string): number Returns the count of graphemes in a string, the individually rendered characters.
strstringnumber (str: string): string Removes leading and trailing spaces from each line of a string.
strstringstring (source: string, ensured: string): string Adds the substring ensured to the end of the source string if it's not already present.
sourcestringensuredstringstring (source: string, ensured: string): string Adds the substring ensured to the start of the source string if it's not already present.
sourcestringensuredstringstring (count: number | null | undefined, suffix?: string): string Returns a plural suffix based on a count.
countnumber | null | undefinedsuffixstring's'string (value: unknown): string Stringifies a value like JSON.stringify but with some corner cases handled better.
valueunknownstring (source: string, stripped: string): string Removes characters inclusive of stripped.
sourcestringstrippedstringstring (str: string): string Strips ANSI escape sequences from a string
strstringstring (source: string, stripped: string): string Removes characters inclusive of stripped.
sourcestringstrippedstringstring (source: string, stripped: string): string Removes characters inclusive of stripped.
sourcestringstrippedstringstring (source: string, stripped: string): string Removes characters inclusive of stripped.
sourcestringstrippedstringstring (str: string, maxLength: number, suffix?: string): string Truncates a string to a maximum length, adding a suffix if needed that defaults to ....
strstringmaxLengthnumbersuffixstring'...'string