QMDcount()

Top  Previous  Next

 

The QMDcount() function counts delimited items in a string. It is analogous to the QMBasic DCOUNT() function.

 

 

Format

 

VBQMDcount(ByVal Src as String, ByVal Delim as String) as Long

 

Cint QMDcount(char * Src, char * Delim)

 

where

 

Srcis the string to be processed

 

Delimis the delimiter character. If Delim is more than one character long, only the first character is used.

 

 

The QMDcount() function is usually used to count fields, values or subvalues in a dynamic array but can be used to count elements in any string that is separated by some single character delimiter.

 

This function is evaluated on the client system and does not require a server connection to be open.

 

 

Examples

 

VB

X = QMDcount(Address, ",")

C

X = QMDcount(Address, ",");

 

The above example returns the number of comma separated items in the Address variable.