IBM 15 Switch User Manual


 
143
CLEM Language Reference
Function
Result
Description
ismidstring(SUBSTRING, STRING)
Integer
If SUBSTRING is a substring of STRING
but does not st art on the rst character of
STRING or end on the last, then th i s 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.
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 the strin g STRING, starting from
its Nth character, for a substring equal to the
string SUBSTRING. If found, this functio n
returns the integer subscript at which the
matching substring begins. Otherwise, this
function returns a value of 0. If N is not
given, this fun ct i on defaults to 1.
issubstring(SUBSTRING, STRING)
Integer
Searches the strin g STRING, starting from
its Nth character, for a substring equal to the
string SUBSTRING. If found, this functio n
returns the integer subscript at which the
matching substring begins. Otherwise, this
function returns a value of 0. If N is not
given, this fun ct i on 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 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 supplying 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 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.