strindex
Previous Topic  Next Topic 

Synopsis:

       index=strindex (str,str1[,str2[,str3...]])


Arguments:

       str - The string to match

       str1 - The first comparison string

       [str2] - The second comparison string

       [str3] - The third comparison string

       ...        


Description: This function compares the given string, str, against the set of other strings, str1, str2, str3... etc and will return the index number of the first string that matches str.    The index ranges from 1 upwards for str1 onwards.    If none of the strings, str1, str2, str3... etc match the given string, str, then the function will return 0.


For example:


       string="MAR";

       // This will return 3

       which_month=strindex(string,"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");



Returns:  Returns the index 1, 2, 3.. of the first string str1, str2 ,str2… to match str, or 0 if the string is not found in the list.