@visulima/string
Version:
Functions for manipulating strings.
17 lines (15 loc) • 510 B
text/typescript
declare const WrapMode: {
readonly BREAK_AT_CHARACTERS: "BREAK_AT_CHARACTERS";
readonly BREAK_WORDS: "BREAK_WORDS";
readonly PRESERVE_WORDS: "PRESERVE_WORDS";
readonly STRICT_WIDTH: "STRICT_WIDTH";
};
interface WordWrapOptions {
removeZeroWidthCharacters?: boolean;
trim?: boolean;
width?: number;
wrapMode?: keyof typeof WrapMode;
}
declare const wordWrap: (string: string, options?: WordWrapOptions) => string;
export { WrapMode, wordWrap };
export type { WordWrapOptions };