company logo

Value :: replaceString - Replace text

The function allows replacing text strings in a text value. When the value handle refers to a text property, text passed in sOld is replaced by the text passed in sNew .

When the function is called for a complex instance, text is replaced in all text properties ( CHAR , STRING , MEMO ). Updated instances are stored to database after replacing the text.

When no instance is selected in the value handle or the value is not a text property, the function throws an exception.

Notes:

When replacing text in key attributes, this may affect several access key indexes, which causes reordering the collection. Hence, some instances might be skipped when iterating through a collection with updated text attribute components. In order to avoid this problem, an access key not containing text properties should be selected whenever possible before calling the function.

Implementation details

Value  :: replaceString ( odaba::String &sOld, odaba::String &sNew )
  • sOld - Old string value
  • sNew - New string value