Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_strsrch() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_STRSRCH()

 DESCRIPTION

 C_STRSRCH() searches a given string for the specified characters
 and returns the position of the characters.  It can be used to find
 the first or any occurrence of the specified characters.

 SYNTAX

 C_STRSRCH(chars, string [,occurrence] [,ignore_case])

 PARAMETERS

 chars (C) is the characters to find in the string.

 string (C) is the character string to search.

 occurrence (N) is the number of occurrences of the characters to
 find.  If occurrence is not specified, the first occurrence is returned.

 ignore_case (L) indicates whether or not the search should be case-
 sensitive.  Specify true (.T.) to search for any match regardless
 of upper or lower case.  Specify false (.F.) to search for an exact
 match.  If ignore_case is not specified, the default of false (.F.)
 is used.

 RETURNS

 C_STRSRCH() returns the beginning position of the characters in the
 string, or zero (0) if the characters are not found.

 EXAMPLES

 s1 = "look for the phrase text string twice in this text string"

 ? c_strsrch("text string",s1)   --> 21     && Returns first occurrence
 ? c_strsrch("text string",s1,3) --> 47     && Returns second occurrence
 ? c_strsrch("data",s1)          --> 0      && Returns zero - not found
 ...
 ...
 for i = 1 to 3                             && In a loop, display all
   ? c_strsrch("text string",s1,i)          && occurrences of "text string"
 next


See Also: C_STRPARSE() C_STRCOUNT() C_PARTSTR() C_STRDELIM()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson