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) replace_values old_string in the source_string_dataitem with new_string.
description
The replace_value function replaces only string values that fully matches. 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