user manual
143
CLEM Language Reference
Function
Result
Description
ismidstring(SUBSTRING, STRING)
Integer
If SUBSTRING is a substring of STRING
but does not start on the first character of
STRING or end on the l ast, 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
specified s t ring (oft en a field name) is a
character whose char act er code is a digit.
Otherwise, this function returns a value of 0.
For example, isnumbercode(product_id(2)).
isstartstring(SUBSTRING, STRING)
Integer
If the string STRING starts with the substring
SUBSTRING, then this function returns the
subscript 1. Otherwise, this function returns
a value of 0.
issubstring(SUBSTRING, N, STRING)
Integer
Searches t he st ring STRING, starting from
its Nth character, for a substring equal to the
string SUBSTRING. If found, this function
returns the integer subscript at whi ch the
matching s ubstring begins. Otherwise, this
function ret urns a value of 0. If N is not
given, this function defaults to 1.
issubstring(SUBSTRING, STRING)
Integer
Searches t he st ring STRING, starting from
its Nth character, for a substring equal to the
string SUBSTRING. If found, this function
returns the integer subscript at whi ch the
matching s ubstring begins. Otherwise, this
function ret urns a value of 0. If N is not
given, this function defaults to 1.
issubstring_count(SUBSTRING, N, STRING):
Integer
Returns the index of the Nth occur rence of
SUBSTRING within the specified STRING.
If there are fewer than N occurrences of
SUBSTRING, 0 is returned.
issubstring_lim(SUBSTRING, N, STARTLIM,
ENDLIM, STRING)
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 STA
RTLIM or ENDLIM constraints
may be disabled by supplyi ng a value of
false for either argument—for example,
issub
string_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 val i d
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 o f the string
STRING—that is, the number of characters
in it.