Replace_value
String functions replace_value
syntax
- replace_value(source_string_dataitem, old_string, new_string)
definition
replace_value(source_string_dataitem, old_string, new_string) replaces old_string in the source_string_dataitem with new_string.
description
The replace_value function replaces only string values that fully match. The Replace function replaces full and substrings in source_string_dataitem.
The replace_value function is case insensitive.
applies to
- data items source_string_dataitem, old_string, new_string with string Value type
conditions
The Domain unit of all arguments must match or be Void (literals or parameters can be compared to data items of any domain unit).
example
attribute<string> replace_valueA (ADomain) := replace_value(A, 'Tes', 'Taart');
| A | replace_valueA |
|---|---|
| ‘Tes’ | ‘Taart’ |
| ‘tes’ | ‘Taart’ |
| ‘88hallo99’ | ‘88hallo99’ |
| ‘Test met Text’ | ‘Test met Text’ |
| ‘Tes met Test’ | ‘Tes met Test’ |
ADomain, nr of rows = 5