import type { ILocalizedString } from '@microsoft/sp-module-interfaces'; /** * Operations for working with strings that contain text. * * @remarks * The utilities provided by this class are intended to be simple, small, and very * broadly applicable. * * @public */ export default class Text { /** * Format a string by substituting parameters. * * @remarks * This function replaces template parameters such as `"{0}"` or `"{1}"` with the * corresponding argument. If the value is null or undefined, it will be replaced * by the word `"null"` or `"undefined"`. The format string s must not be null or * undefined. * * Usage example: * * `Text.format("hello {0}!", "world")` will return `"hello world!"` */ static format(s: string, ...values: unknown[]): string; /** * Returns the input string, with all instances of `searchValue` replaced by `replaceValue`. * * @remarks * Note that JavaScript's `string.replace()` only replaces the first match, unless a * global RegExp is provided. * * @param input - The string to be modified * @param searchValue - The value to search for * @param replaceValue - The replacement text */ static replaceAll(input: string, searchValue: string, replaceValue: string): string; /** * Gets a string for the provided locale * @param localizedString - object that specifies localized strings * @param currentUICultureName - name of the current UI culture * @returns string for the provided locale or default string * * @remarks * Format of the localizedStrings parameter: * \{ * default: 'default locale string', * 'en-US': 'US locale string' * \} * * @internal */ static _getLocalizedString(localizedString: ILocalizedString, currentUICultureName: string): string | undefined; } //# sourceMappingURL=Text.d.ts.map