13 lines
757 B
Plaintext
Raw Normal View History

{
"name": "replace",
"type": "function",
"description": "Returns a string with the supplied string or array of strings replaced by a string or an array of strings.",
"arguments": [ {"arg":"string","description":"the input string"},
{"arg":"before","description":"the string or array of strings to replace"},
{"arg":"after","description":"the string or array of strings to use as a replacement"}],
"examples": [ { "expression":"replace('QGIS SHOULD ROCK','SHOULD','DOES')", "returns":"'QGIS DOES ROCK'"},
{ "expression":"replace('QGIS ABC',array('A','B','C'),array('X','Y','Z'))", "returns":"'QGIS XYZ'"},
{ "expression":"replace('QGIS',array('Q','S'),'')", "returns":"'GI'"}
]
}