export declare namespace StringUtils { /** * will show current copyright year * © 2023 */ const copyright: string; /** * Like indexOf but will give not only the first one but all of them * @param string * @param searchString */ function indicesOf(string: string, searchString: string): number[]; /** * Reverse of indicesOf * @param string * @param searchString */ function lastIndicesOf(string: string, searchString: string): number[]; /** * test -> Test * @param string */ function capitalize(string: string): string; /** * replaceAll('I am groot, and I am big', 'am', 'want') -> I want groot, and I want big * @param str * @param search * @param replacement */ function replaceAll(str: string, search: string, replacement: string): string; function replaceSpecialChars(str: string, replacement: string): string; function replaceSpecialCharsExceptSpaces(str: string, replacement: string): string; /** * remove all white spaces * @param value */ /** * @deprecated use native str.trim() instead * @param str */ function removeWhiteSpaces(str: string): string; function htmlDecode(html: string): string; /** replaceVars('{{total_apples}} apples for {{price}} euro', {total_apples:12, price:2}) */ function replaceVars(str: string, fields: Object): string; /** * parse score values * return value as string, if value is none it will return - by default * @param result * @param noneSymbol */ function resultLabel(result: number | string | undefined | null, noneSymbol?: string): string; /** * will format a number to currency * example: currencyLabel(10000) -> '10 000 €' when initLanguage('fr') is called before * @param value */ function currencyLabel(value: number): string; /** * parse ranking values * 1e 2e 3e * 1st 2st 3th * @param result */ function rankLabel(result?: number): string; /** * 20000 -> 20.000,- * @param value */ function toCurrency(value: number): string; }