Skip to main content

$CHANGE

Performs MultiValue substring replacement.

Synopsis

$CHANGE(string,subout,subin,occurrences,begin)

Parameters

Argument Description
string The string in which substring substitutions are made. Any expression that resolves to a valid variable. string may be a dynamic array.
subout The substring to be replaced. Any expression that resolves to a valid string or numeric.
subin The substring to be inserted in place of subout. Any expression that resolves to a valid string or numeric.
occurrences Optional — A positive integer specifying the number of occurrences of subout to replace with subin. If omitted, all occurrences are replaced. If used with begin, you can specify an occurrences value of -1 indicating that all occurrences of subout from the begin point to the end of the string are to be replaced.
begin Optional — An integer specifying which occurrence of subout to begin replacement with. If omitted, or specified as 0 or 1, replacement begins with the first occurrence of subout.

Description

The $CHANGE function invokes the Caché MVBasic CHANGE function, and returns the resulting value to the ObjectScript environment. Specify parameter values in MVBasic form. For further details refer to the Caché MultiValue Basic Reference.

FeedbackOpens in a new tab