@gpa-gemstone/helper-functions
Version:
Helper Functions for gpa-gemstone packages
11 lines (10 loc) • 615 B
TypeScript
/**
* Replaces all occurrences of a substring in the source string, escaping special characters and supporting optional case-insensitivity.
*
* @param source - The original string to perform replacements on.
* @param findText - The substring or pattern to find (treated literally).
* @param replaceWith - The replacement string (dollar signs are escaped automatically).
* @param ignoreCase - Flag to ignore case (default `false`).
* @returns A new string with all matches replaced.
*/
export declare const ReplaceAll: (source: string, findText: string, replaceWith: string, ignoreCase?: boolean) => string;