# CountStringTokens2

## Description

Counts the number of tokens separated by a specified delimiter, for example a string containing "first:second:third" has three tokens delimited by ":". Similar to CountStringTokens except that this command accepts only a single character as the delimiter and recognises empty fields. For example "first:second::fourth" has four tokens with the third being an empty string.

## Definition

integer CountStringTokens2( str, delimiter )

int agk::CountStringTokens2( const char* str, const char* delimiter )

## Parameters

- str - The string to check.
- delimiter - The character that delimits the string