Harbour Reference Guide

 

GT_CHRCOUNT()

Count the number of times a character appears in a string

Syntax

GT_ChrCount(<cChr>, <cStr>) --> nFreq

Arguments

<cChr> - The character to find the frequence of <cStr> - The string in which to find the character

Returns

nFreq - The number of times <cChr> occurs in <cStr>

Description

GT_ChrCount() counts how many times a specified character appears in a string.

NOTE: invalid parameters will return -1
Examples
      ? GT_ChrCount("t", "the cat sat on the mat")      // prints 4
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