Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] array support for the replace() expression function
- Loading branch information
Showing
3 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
{ | ||
"name": "replace", | ||
"type": "function", | ||
"description": "Returns a string with the the supplied string replaced.", | ||
"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 to replace"}, | ||
{"arg":"after","description":"the string to use as a replacement"}], | ||
"examples": [ { "expression":"replace('QGIS SHOULD ROCK','SHOULD','DOES')", "returns":"'QGIS DOES ROCK'"} | ||
{"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'"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters