Replace_value - ObjectVision/GeoDMS GitHub Wiki

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

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

see also

⚠️ **GitHub.com Fallback** ⚠️