145
CLEM Language Reference
Function Result Description
stripchar(CHAR,STRING) String
Enables you to remove specied characters
from a string or eld. You can use this
function, for example, to remove extra
symbols, such as currency notations, from
data to achieve a simple number or name.
For example, using the syntax stripchar(`$`,
'Cost') returns a new eld with the dollar
sign removed from all values.
Note: Be sure to use single backquotes to
encapsulate the specied character.
skipchar(CHAR, N, STRING) Integer
Searches the string STRING for any
character other than CHAR, starting at the
Nth character. This function returns an
integer substring indicating the point at
which one is found or 0 if every character
from the Nth onward is a CHAR. If the
function has an invalid offset (for example,
an offset that is beyond the length of the
string), this function returns $null$.
locchar isofte n used in conjunction with the
skipchar functions to determine the value
of N(the point at which to start searching
the string). For example, skipchar(`s`,
(locchar(`s`,1, "MyString "))," MyString").
skipchar_back(CHAR, N, STRING) Integer
Similart o skipchar, except that the search is
performed backward, starting from the Nth
character.
startstring(LENGTH, STRING) String
Extracts the rst Ncharacters from the
specied string. If the string length is less
than or equal to the specied length, then it
is unchanged.
strmember(CHAR, STRING) Integer
Equivalent to locchar(CHAR, 1, STRING). It
returns an integer substring indicating the
pointat which CHAR rst occurs,or 0. If t he
function has an invalid offset (for example,
an offset that is beyond the length of the
string), this function returns $null$.
subscrs(N,ST RING) CHAR
Returnsth e Nth character CHAR of the input
string STRING. This function can also be
written in a shorthand form as STRING(N).
For example, lowertoupper(“name”(1)) is a
valid expression.
substring(N,LE N,ST RING) String
Returnsa string SUBSTRI NG,which consists
ofth e LEN characters of the string STRING,
starting from the character at subscript N.
substring_between(N1, N2, STRING) String
Returns the substring of STRING, which
begins at subscript N1 and ends at subscript
N2.
trim(STRING) String Removes leading and trailing white space
characters from the specied string.
trim_start(STRING) String Removes leading white space characters
from the specied string.
trimend(STRING) String Removes trailing white space characters
from the specied string.