Caché MultiValue Basic Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   

Returns the number of delimited substrings in a string.
string The string to search for instances of delimiter. An expression that resolves to a string.
delimiter One or more characters used as a delimiter in string. An expression that resolves to a string.
The DCOUNT function returns the number of delimited substrings that appears in string.
String matching is case-sensitive. Numbers are converted to canonical form, with leading and trailing zeroes and plus signs removed. Numeric strings are not converted to canonical form.
If delimiter doesn't appear in string, DCOUNT returns 1. If delimiter is the null string, DCOUNT returns the number of characters in the string, plus 1.
If string is an empty string ("") DCOUNT returns a count of 0.
The following example uses the DCOUNT function to return the number of Value Mark delimited substrings in a dynamic array:
PRINT DCOUNT(colors,CHAR(253));  ! Returns 4
See Also