Variable StringUtilsConst

StringUtils: {
    byteSize: ((str: string) => number);
    chunkByBytes: ((str: string, maxBytes: number) => string[]);
} = ...

Type declaration

  • byteSize: ((str: string) => number)
      • (str: string): number
      • Parameters

        • str: string

        Returns number

  • chunkByBytes: ((str: string, maxBytes: number) => string[])
      • (str: string, maxBytes: number): 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

        Parameters

        • str: string

          The string to chunk

        • maxBytes: number

          number of bytes to impose as a limit

        Returns string[]

Generated using TypeDoc