/** * Trim whitespace from both ends. */ export declare function trim(value: string): string; /** * Trim whitespace from the start. */ export declare function trimStart(value: string): string; /** * Trim whitespace from the end. */ export declare function trimEnd(value: string): string; /** * Convert to lowercase. */ export declare function lowercase(value: string): string; /** * Convert to uppercase. */ export declare function uppercase(value: string): string; /** * Capitalize the first letter. */ export declare function capitalize(value: string): string; /** * Capitalize the first letter of each word. */ export declare function titleCase(value: string): string; /** * Convert to camelCase. */ export declare function camelCase(value: string): string; /** * Convert to kebab-case. */ export declare function kebabCase(value: string): string; /** * Convert to snake_case. */ export declare function snakeCase(value: string): string; /** * Strip HTML tags from a string. * * @example * ```ts * stripHtml("

Hello world

") // "Hello world" * ``` */ export declare function stripHtml(value: string): string; /** * Escape HTML special characters to prevent XSS. * * @example * ```ts * escapeHtml('') * // '<script>alert("xss")</script>' * ``` */ export declare function escapeHtml(value: string): string; /** * Unescape HTML entities. */ export declare function unescapeHtml(value: string): string; /** * Truncate a string to a maximum length. * * @example * ```ts * truncate("Hello, World!", 8) // "Hello..." * truncate("Hello, World!", 8, "…") // "Hello, …" * ``` */ export declare function truncate(value: string, maxLength: number, suffix?: string): string; /** * Convert a string to a URL-friendly slug. * * @example * ```ts * slugify("Hello, World! 🌍") // "hello-world" * slugify(" Foo BAR baz ") // "foo-bar-baz" * ``` */ export declare function slugify(value: string): string; /** * Remove all whitespace from a string. */ export declare function removeWhitespace(value: string): string; /** * Collapse multiple spaces into a single space. */ export declare function collapseWhitespace(value: string): string; /** * Pad a string to a minimum length (left-pads by default). */ export declare function padStart(value: string, length: number, fillChar?: string): string; /** * Pad a string to a minimum length (right-pads). */ export declare function padEnd(value: string, length: number, fillChar?: string): string; /** * Reverse a string (Unicode-aware). */ export declare function reverse(value: string): string; /** * Count occurrences of a substring. */ export declare function countOccurrences(value: string, search: string): number; //# sourceMappingURL=sanitize.d.ts.map