Caché MultiValue Basic Reference
INDEXS
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Returns the starting position of a substring for each element of a dynamic array.
Synopsis
INDEXS(dynarray,substring,occurs)
Arguments
dynarray A dynamic array of elements to be searched for substring. An expression that resolves to a dynamic array.
substring An expression that resolves to a substring to locate within string.
occurs An expression that resolves to a positive integer specifying which occurrence of substring to locate.
Description
The INDEXS function returns a dynamic array of integers, each integer element containing the starting character position, counting from 1, of substring within the corresponding dynarray element. Matching of substring is case-sensitive. You use the occurs argument to specify which occurrence of substring to return the location of.
INDEXS returns 0 for a dynamic array element for any of the following:
If occurs is a mixed numeric string, the numeric part is parsed until a non-numeric character is encountered. Thus “7dwarves” is parsed as 7.
See Also