string.d.ts 751 B

123456789101112131415161718
  1. /**
  2. * Get the distance to the end of the first character in a string of text.
  3. */
  4. export declare const getCharacterDistance: (str: string, isRTL?: boolean) => number;
  5. /**
  6. * Get the distance to the end of the first word in a string of text.
  7. */
  8. export declare const getWordDistance: (text: string, isRTL?: boolean) => number;
  9. /**
  10. * Split a string in two parts at a given distance starting from the end when
  11. * `isRTL` is set to `true`.
  12. */
  13. export declare const splitByCharacterDistance: (str: string, dist: number, isRTL?: boolean | undefined) => [string, string];
  14. /**
  15. * Iterate on codepoints from right to left.
  16. */
  17. export declare const codepointsIteratorRTL: (str: string) => Generator<string, void, unknown>;
  18. //# sourceMappingURL=string.d.ts.map