Harbour Reference 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

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30