Variable StringUtilsConst
StringUtils: {
byteSize: ((str: string) => number);
chunkByBytes: ((str: string, maxBytes: number) => string[]);
} = ...
Type declaration
-
byteSize: ((str: string) => number)
-
- (str: string): number
-
Returns number
-
chunkByBytes: ((str: string, maxBytes: number) => string[])
-
- (str: string, maxBytes: number): string[]
-
Parameters
-
str: string
-
maxBytes: number
Returns string[]
Creates an array of strings split into groups, limited to the specified size. If array can't be split evenly, the final chunk will be the remaining.
Returns
Array of string chunks