📜  XPath 函数 translate() - 任何代码示例

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

代码示例1
translate(string, abc, XYZ)

string = The string to evaluate.
abc    = The string of characters that will be replaced.
XYZ    = The string of characters used for replacement. The first character in XYZ will replace every occurrence of the first character in abc that appears in string.

Replace 'red' with 'brown' in 'There's a red fox':

translate("There's a red fox","red","brown")

Remove " USD" in "7.99 USD":

translate("7.99 USD"," USD","")