Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>countleft()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COUNTLEFT()
 Counts a particular character at the beginning of a string
------------------------------------------------------------------------------
 Syntax

     COUNTLEFT(<cString>,[<cCharacter|nCharacter>])
        --> nNumber

 Arguments

     <cString>  Designates the character string in which the
     <cCharacter|nCharacter> character is counted.

     <cCharacter|nCharacter>  Designates the character at the beginning
     of the <cString> that is counted.  The default value is a space,
     CHR(32).

 Returns

     COUNTLEFT() returns the number of <cCharacter|nCharacter> characters
     that appear in an uninterrupted sequence at the beginning of <cString>.

 Description

     While REMLEFT() removes leading characters from the <cString>,
     COUNTLEFT() only determines the number of leading <cCharacter|
     nCharacter> characters appearing in an uninterrupted sequence at the
     beginning of the <cString>.

 Examples

     .  Count the blanks:

        ? COUNTLEFT("   123")               // Result: 3

     .  Count the "." characters:

        ? COUNTLEFT("..4.123", ".")         // Result: 2

     .  In this example, there is nothing to count:

        ? COUNTLEFT("123456")               // Result: 0


See Also: COUNTRIGHT()

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