143
CLEM Language Reference
Function Result Description
ismidstring(SUBSTRING, STRING) Integer
If SUBSTRING is a substring of STRING
but does not start on the rst character of
STRINGor end on the last, then this function
returns the subscript at which the substring
starts. Otherwise, this function returns a
value of 0.
isnumbercode(CHAR) Boolean
Returns a value of true if CHAR for the
specied string (often a eld name) is a
character whose character code is a digit.
Otherwise, this function returns a value of 0.
Forex ample, isnumbercode(product_id(2)).
isstartstring(SUBSTRING, STRING) Integer
Ifthe string STR ING startsw ith the substring
SUBSTRING, then this function returns the
subscript 1. Otherwise, this function returns
a value of 0.
issubstring(SUBSTRING, N, STRING) Integer
Searches the string STRING, starting from
itsNth character, for a substring equal to the
string SUBSTRING. If found, this function
returns the integer subscript at which the
matching substring begins. Otherwise, this
function returns a value of 0. If Nis not
given, this function defaults to 1.
issubstring(SUBSTRING, STRING) Integer
Searches the string STRING, starting from
itsNth character, for a substring equal to the
string SUBSTRING. If found, this function
returns the integer subscript at which the
matching substring begins. Otherwise, this
function returns a value of 0. If Nis not
given, this function defaults to 1.
issubstring_count(SUBSTRING, N, STRING): Integer
Returns the index of the Nth occurrence of
SUBSTRING within the specied STRING.
If there are fewer than Noccurrences of
SUBSTRING, 0 is returned.
issubstring_lim(SUBSTRING, N, STARTLIM,
ENDLIM,S TRING) Integer
This function is the same as issubstring,
but the match is constrained to start on
or before the subscript STARTLIM and to
end on or before the subscript ENDLIM.
The STARTLIMor EN DLIM constraints
may be disabled by supplying a value of
false for either argument—for example,
issubstring_lim(SUBSTRING, N, false, false,
STRING) is the same as issubstring.
isuppercode(CHAR) Boolean
Returns a value of true if CHAR is an
uppercase letter character. Otherwise,
this function returns a value of 0. For
example, both isuppercode(``) and
isuppercode(country_name(2)) are valid
expressions.
last(CHAR) String Returns the last character CHAR of STRING
(which must be at least one character long).
length(STRING) Integer
Returns the length of the string
STRING—that is, the number of characters
in it.