2015-06-11 12:02:27 +10:00
|
|
|
{
|
2015-09-20 17:12:43 +02:00
|
|
|
"name": "replace",
|
|
|
|
"type": "function",
|
2016-10-25 14:36:04 +07:00
|
|
|
"description": "Returns a string with the supplied string or array of strings replaced by a string or an array of strings.",
|
2015-06-11 12:02:27 +10:00
|
|
|
"arguments": [ {"arg":"string","description":"the input string"},
|
2016-10-25 14:36:04 +07:00
|
|
|
{"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'"}
|
2015-06-11 12:02:27 +10:00
|
|
|
]
|
|
|
|
}
|