language-extensions/python/test/src/PythonTestUtilities.cpp
//--------------------------------------------------------------------------------------------------
// Name: Utilities::Tokenize
//
// Description:
//  Splits the given character string using the delimiter and
//  adds the tokens to the input vector.
// Remarks:
//  If the input is invalid and unable to be parsed,
//  token will be nullptr and we add nothing to the vector
//
// Returns:
//  nothing.
//

:Tokenize
Description:
Splits the given character string using the delimiter and
adds the tokens to the input vector.
Remarks:
If the input is invalid and unable to be parsed,
token will be nullptr and we add nothing to the vector

nothing.
: Tokenize Description : Splits the given character string using the delimiter and adds the tokens to the input vector . Remarks : If the input is invalid and unable to be parsed token will be nullptr and we add nothing to the vector nothing .
void PythonTestUtilities::Tokenize(
	char           *input,
	const char     *delimiter,
	vector<char *> *tokens)
{
	char *token = strtok(input, delimiter);
	while (token != nullptr)
	{
		(*tokens).push_back(token);
		token = strtok(nullptr, delimiter);
	}
}
void PythonTestUtilities :: Tokenize ( char * input , const char * delimiter , vector < char * > * tokens ) { char * token = strtok ( input , delimiter ) ; while ( token != nullptr ) { ( * tokens ) . push_back ( token ) ; token = strtok ( nullptr , delimiter ) ; } }
Name: Utilities::Tokenize
Description:
Splits the given character string using the delimiter and
adds the tokens to the input vector.
Name : Utilities :: Tokenize Description : Splits the given character string using the delimiter and adds the tokens to the input vector .
// Use strtok iteratively to do the tokenization.
 //
