/** * Convert a string to title case * @param str - The string to convert * * @category Text */ export declare function toTitleCase(str: string): string; /** * Convert a string to camel case * @param str - The string to convert * * @category Text */ export declare function toCamelCase(str: string): string; /** * Parse a file extension from a path * @param path - The path to parse * @returns file extension without the dot (e.g. 'png') * * @category Text */ export declare function parseFileExtension(path: string): string; /** * Get the filename from a path, similar to PHP's basename() * @param url * * @category Text */ export declare function getFilenameFromPath(url: string): string; /** * Escape a string for use in a regular expression * @param str * * @category Text */ export declare function escapeRegExp(str: string): any; /** * Replace all occurrences of a string in another string * @param str - The string to search * @param find - The string to replace * @param replace - The replacement string * * @category Text */ export declare function replaceAll(str: string, find: string, replace: string): string; /** * Replace a string in a text, optionally prepending, appending, replacing all occurrences, and/or calling a callback if the string is not found * @param source - The source text * @param str - The string to replace * @param newStr - The replacement string * @param replaceAll - Replace all occurrences * @param prepend - Prepend the replacement string * @param append - Append the replacement string * @param notFoundCallback - Callback to call if the string is not found * * @category Text */ export declare function safeReplaceString(source: string, str: string, newStr: string, { replaceAll, prepend, append, notFoundCallback, }?: { replaceAll?: boolean | undefined; prepend?: boolean | undefined; append?: boolean | undefined; notFoundCallback?: (() => void) | undefined; }): string; /** * Find the longest common prefix in an array of strings * https://stackoverflow.com/questions/68702774/longest-common-prefix-in-javascript * @param words * * @category Text */ export declare function longestCommonPrefix(words: string[]): string; /** * Escape HTML special characters in a string * @param str * * @category Text */ export declare function escapeHtml(str: string): string; //# sourceMappingURL=text.d.ts.map