Teamlinker/code/server/common/util/string.ts
sx1989827 a02edec68d fix
2021-08-15 11:20:13 +08:00

9 lines
223 B
TypeScript

export default class StringUtil {
static format(str: string, ...arg: any[]) {
let a = str;
for (let k in arg) {
a = a.replace("{" + k + "}", String(arg[k]))
}
return a
}
}