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>return length of prefix in string of chars not in set.</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Return length of prefix in string of chars NOT in set.
------------------------------------------------------------------------------

 Syntax

        GT_strcspn(<cString>, <cSet>) --> nLength

 Arguments:

      <cString> - The string to find the prefix in
      <cSet>    - The set of characters

 Returns:

      nLength   - The length of a string upto a character in the set

 Description:

      Return the number of characters in the leading segment of a
      string that consists solely of characters NOT in the set.

 Examples:


      ? GT_strcspn("this is a test", "as ")      // prints 3
      ? GT_strcspn("this is a test", "elnjpq")   // prints 11


 Source: STRCSPN.C

 Author:  Andy M Leighton

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