The replace() function searches for all occurrences of a given string in a string, and replaces them with another specified string, returning the resulting new string.
replace(str, find, replace)
| Argument | Type | Description |
|---|---|---|
str | String | The string whose substrings are to be found and replaced |
find | String | The string to be searched for and replaced |
replace | String | The string to replace find |
Return type: String
UQLreturn replace("ultipa graph", "u", "U")
Result: Ultipa graph
Update the values of gender property of the @account nodes ("female" or "male") by replacing their first letters with their capitalizations.
UQLfind().nodes({@account}) as acc return case acc.gender when "female" then replace(acc.gender, "f", "F") else replace(acc.gender, "m", "M") end