# GetStringToken

## Description

Returns a specific token from a string separated by the given delimiters, for example a string containing "first:second:third" has three tokens delimited by ":" and "first:second;thrid" has three tokens separated by the delimiters ":;". You can have multiple delimiters between each token, for example "first:;second:third" is valid, and has three tokens. In tier 2 the returned string must be deleted when you are done with it. You can use CountStringTokens to count the number of tokens in the string. This command is useful for separating words in a sentence, which can be delimited by both white space and punctuation.

## Definition

string GetStringToken( str, delimiters, token )

char* agk::GetStringToken( const char* str, const char* delimiters, int token )

## Parameters

- str - The string to check.
- delimiters - The set of characters that delimit the string.
- token - the index of the token to return, starting at 1 for the first token.