Alternate Entry Name: .ANY
B: pos = any( char, string [, i] );
/* C users use "strchr" */
ANY scans "string" for an occurrence of the character "char". If "i" is specified, the scan begins with the i'th character of "string". Otherwise, the scan begins at the start of "string". If ANY finds an occurrence of "char" in "string", it returns the position in which "char" was found. If "char" is not found, the value "-1" is returned.
Note that ANY considers the '*e' at the end of "string" to be part of "string"; thus if "char" has the value '*e', ANY will always find a match.
/* count all the occurrences of "="'s in "string" */ for( count=i=0; i=any('=',string,i)+1 ; count++);
Copyright © 1996, Thinkage Ltd.