Skip to main content

Function: splitText()

splitText(str: string, length: number, char: string): string

Split a string by its latest space character in a range from the character 0 to the selected one.

Parameters

ParameterTypeDefault valueDescription
strstringundefinedThe text to split.
lengthnumberundefinedThe length of the desired string.
charstring' 'The character to split with

Returns

string

2019 Aura Román

License

Apache-2.0

Source

lib/splitText.ts:9