Equinox Online Help - Language Reference - A to Z
ArraySearchNext |
|
---|---|
Applies to | |
Syntax | ArraySearchNext ArrayExpression, PatternExpression, [StartItem, LengthItem, SearchExpression, ColumnExpression, IndexItem1, IndexItem2, IndexItem3, IndexItem4] |
Action | [Statement] Searches for a string within a string array. |
Scope | Usable anywhere. |
Notes | This statement searches for the string PatternExpression, inside all the strings in ArrayExpression. The ArraySearchNext statement uses the start and index parameters returned by a previous ArraySearch statement as the place to start searching from. You can include the following special characters in PatternExpression:
The fifth argument, SearchExpression, can take one of the following values:
If you omit SearchExpression, then by default the value 0 is used Exact case dictates that the two strings must be the same case to match. Any case ignores the case differences. Special characters sometimes occur in the target, for example back-slash occurs in operating system file paths. You can choose to ignore special characters in the PatternExpression, and treat them as literal characters. Match part of an item means a sliding search, for example, searching for "asdf" in "this asdf string" returns true. If PatternExpression is not matched, SysError is set to a nonzero value. Otherwise it is set to zero, the position of its first character is returned in StartItem, and the length of the matching portion of StringExpression is returned in LengthItem (if it is included). This is useful if you include wildcard characters in PatternExpression. ColumnExpression specifies the element in the rightmost dimension that is searched in multi-dimensional arrays. If omitted or zero, every element is searched. If the string is matched, the index in each array dimension is returned in the four final parameters. Note that in order for ArraySearchNext to work, you must supply an argument to receive the array index for each significant dimension in the array, and the start parameter if doing a partial search. |
Category | Arrays |
See Also | ArrayFind, ArrayFindNext, ArrayGetDimensions, ArraySearch, ArraySetDimensions, ArraySort, ArrayNeg, ArrayNot, Vector, VectorSize |
Example | This example shows the effect of different values of SearchExpression. string vs[] This example searches one column of a multicolumn array. string ss[2][3][4] |