Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) Tools Help GTL - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

GT_CHRTOTAL()

Find number of times a set of characters appears in a string
---------------------------------------------------------------------------------

 Syntax

        GT_ChrTotal(<cChrs>, <cStr>) --> nTotOcc  

 Arguments

        <cChrs>   - The set of characters <cStr>  - The string to 
                  search

 Returns

        <nTotOcc>   - The number of times the characters specified in 
                  <cChrs> appears in <cStr>

 Description

      Returns the numnber of occurrences of characters belonging  to the
      set <cChrs> in the string <cStr>.  If no characters  in <cChrs>
      appears in <cStr> GT_ChrTotal() will return 0.

      NOTE:  invalid parameters will return -1

 Examples

       local cStr1 := "the cat sat on the mat"

       ? GT_ChrTotal("tae", cStr1)            // prints 10
       ? GT_ChrTotal("zqw", cStr1)            // prints  0

Status

      Ready

 Files

      Library is libgt
      Library is libgt

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