REPLACE
strings
Replaces the first occurrence of a pattern by its substitution.
The REPLACE
consumes 3 parameters from the stack:
- the replacement value
- the pattern to search, could be a regular expression
- the input value
All parameters are converted into strings via the toString() method before the replacement is done.
REPLACE is available since version 1.1.0.
See also
Signatures
Examples
'This is false' // input
false // pattern
true // replacement
REPLACE
'This is false' // input
'(fa..e)' // regexp pattern
true // replacement
REPLACE
'The Warp 42 Platform is designed to collect, store and manipulate sensor data.' // input
42 // pattern
10 // replacement
REPLACE