//#region src/string/truncate.d.ts /** * Truncates string if it's longer than the given maximum string length. * * @param str - The string to truncate * @param options - The options object * @param options.length - The maximum string length (default: 30) * @param options.omission - The string to indicate text is omitted (default: '...') * @returns The truncated string * * @example * truncate('Hi-Diddly-Ho there, Flanders!') // => 'Hi-Diddly-Ho there, Flanders!' * truncate('Hi-Diddly-Ho there, Flanders!', { length: 20 }) // => 'Hi-Diddly-Ho ther...' * truncate('Hi-Diddly-Ho there, Flanders!', { length: 20, omission: ' [...]' }) // => 'Hi-Diddly-Ho [...]' */ declare function truncate(str: string, options?: { length?: number; omission?: string; }): string; //#endregion export { truncate }; //# sourceMappingURL=truncate.d.cts.map