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 length of prefix of a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Find length of prefix of a string
------------------------------------------------------------------------------

 Syntax

        GT_StrLeft(<cStr>, <cChars>) --> nLen

 Arguments:

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

 Returns:

      nLen     - The length of the prefix found.

 Description:

      Return the length of the leading segment in the passed string
      <cStr> that consists solely of the characters in the character
      set <cChars>.

      If no characters in the the search set are found, the function
      shall return 0

 Examples:


      ? GT_StrLeft("this is a test", "hsit ")       // prints 8
      ? GT_StrLeft("this is a test", "hit a")       // prints 3
      ? GT_StrLeft("this is a test", "zxy")         // prints 0


 Source: STRLEFT.C

 Author:  Andy M Leighton

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