UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

DCOUNT Syntax DCOUNT(str,delim) Description The UniBasic DCOUNT function returns the number of substrings delimited by delim in a string. If str is an empty string, UniData returns 0. If str contains data but no delimiter, UniData returns 1. DCOUNT supports multibyte languages. Parameters The following table describes each parameter of the syntax. Paramete r Description Examples In the following example, the program segment finds three occurrences of the value mark and prints 3: STR = 123:@VM:456:@VM:789 SUBS = DCOUNT(STR,@VM) PRINT SUBS In the next example, the program segment prints 1 because no delimiter is found in the string: STR = 123 DCOUNT(STR,@VM) PRINT SUBS 1-191 UniBasic Commands Reference str Specifies the string to search for occurrences of substrings delimited by delim. delim Specifies the delimiter to use in searching str. DCOUNT Parameters

The following example prints 3: STR="A/B/C" PRINT DCOUNT(STR,"/") Related Commands UniBasic COUNT, COUNTS DCOUNT 1-192

The following example prints 3:<br />

STR="A/B/C"<br />

PRINT DCOUNT(STR,"/")<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

COUNT, COUNTS<br />

DCOUNT 1-192

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!