Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>find which character occurs first in a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Find which character occurs first in a string
------------------------------------------------------------------------------

 Syntax

        GT_ChrFirst(<cChars>, <cStr>) --> nAsc

 Arguments:

      <cChars> - The set of characters to find
      <cStr>   - The input string

 Returns:

      nAsc     - The ASCII value of the first character in <cChars>
                 which appears first in <cStr>

 Description:

      Return the ascii value of a character in <cChars>
      which appears first in <cStr>.

 Examples:


      ? chr(GT_ChrFirst("sa ", "This is a test"))  // prints "s"
      ? chr(GT_ChrFirst("et",  "This is a test"))   // prints "t"


 Source: CHRFIRST.C

 Author:  Andy M Leighton

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