|
find
|
The find function returns the location of a match string found
in a target string. The find function is case sensitive
(upper and lower case letters do not match). If the match string is
not found, the Boolean value false is returned. The find
function may also be supplied with a vector of match strings instead
of just a single match string (up to 256 match strings are supported).
If a vector of match strings is supplied, then the find
function returns the location of the first match string found, and
sets the cdr of the match vector to the index of the match string
found.
When to use The find function is used to locate a match string in a target
String or Text.
The position where the match string was found. If the match
string was not found, the find function returns false. The match
string cannot contain wildcard characters. If it contains empty text
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
This example shows the find function operating on two sets of string or text.
The find function compares the first string argument with the second string argument.
If the first string argument matches the second string argument, then the position of
the first argument string in the second string argument is returned. The user may
also specify the position in the second string argument where the search
will begin using an optional integer argument. If there is no match found,
then the Boolean value false is returned by the function.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types matchstr The match string string targetstr The target string string startpos (optional) The position in the targetstr where the
search is to begin integer
Returns:
(i.e. ""), find returns the character position specified by startpos.
Examples
Argument Types
String
Vector
Integer
How do I contact the AIS team?