/** * 字符串处理模块 */ export declare module tsString { /** * 将任意类型格式化为string类型 * @param arg 任意类型 * @returns */ function toString(arg: any): string; /** * 格式化字符串-指定类型 * @param message 带格式的字符串("example: {0}, {1}") * @param replacements strng类型参数(["hello", "world"]) * @returns "example: hello, world" */ function formats(message: string, ...replacements: string[]): string; /** * 格式化字符串 * @param message 带格式的字符串("example: {0}, {1} {2}") * @param replacements 任意类型参数(["hello", "world", 2023]) * @returns "example: hello, world 2023" */ function format(message: string, ...replacements: any[]): string; /** * 字符串去空格 * @param value * @returns */ function trim(value: string): string; /** * 字符串是否为空 * @param value 字符串 * @returns 空:true 非空:false */ function isNullOrEmpty(value: any): boolean; /** * 安全encodeURI * @param value * @returns */ function encodeURI(value: string): string; /** * 格式化number * @param n number (example: 1) * @param len 长度 (example: 3) * @returns (example: "001") */ function formatNumber(n: number, len: number): string; /** * 格式化输出Object属性,用于调式 * @param obj * @returns */ function formatObjectProperty(obj: any): string; }