4.32 STRSUB
Use STRSUB
to substitute one string within another string field or constant.
Syntax
@STRSUB (source_string_or_col
,search_string
,substitute_string
, ...)
Examples
- Example 1
-
For this example, the source string is
"123ABC123"
. The value"123"
is to be replaced with"xx"
. The result isxxABCxx
.result = @STRSUB ("123ABC123", "123", "xx")
- Example 2
-
For this example, the source string is "
123ABC123
". The value "A
" is to be replaced with "z
""1
" is replaced with"0
". The result is023zBC023
.result = @STRSUB ("123ABC123", "A", "z", "1", "0")