📜  用引号包围子字符串 - TypeScript 代码示例

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

代码示例1
str = "toQuotenotToQuote"

quotedStr = str.replace(/(toQuote)/g, '"$1"')

console.log(quotedStr) // "toQuote"notToQuote