📜  替换所有打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:15.588000             🧑  作者: Mango

代码示例1
public replaceAll(str: string, find: string, replace: string) {
    return str.replace(new RegExp(find, 'g'), replace);
}