mirror of
https://github.com/Teamlinker/Teamlinker.git
synced 2025-06-03 03:00:17 +00:00
18 lines
446 B
TypeScript
18 lines
446 B
TypeScript
export default class StringUtil {
|
|
static format(str: string, ...arg: any[]) {
|
|
let a = str;
|
|
for (let k in arg) {
|
|
if(arg[k]!==undefined && arg[k]!==null) {
|
|
a = a.replace("{" + k + "}", String(arg[k]))
|
|
}
|
|
}
|
|
return a
|
|
}
|
|
static isEmpty(str:string) {
|
|
if(str===null || str===undefined || str==="") {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
}
|