@wtasnorg/node-lib / ReplacerString
Defined in: src/strings.ts:1526
Replacer replaces a list of strings with replacements. Instances are immutable after construction and can be safely reused across multiple calls and asynchronous tasks.
const r = newReplacer("<", "<", ">", ">");
console.log(r.replace("<html>")); // "<html>"
new ReplacerString(…
oldnew):Replacer
Defined in: src/strings.ts:1529
…string[]
Replacer
replace(
s):string
Defined in: src/strings.ts:1545
Replace returns a copy of s with all replacements performed.
string
Input string.
string
String with replacements applied.
writeString(
w,s):number
Defined in: src/strings.ts:1574
WriteString writes to w the output of r.Replace(s).
Writer to write to.
string
Input string.
number
Number of bytes written.