#include "stdafx.h" std::string Jenga::Common::EasyToken::GetIdentifierToken( const std::string &source, int &sourceIndex ) { char *token = (char *)malloc( source.size() + 1 ); for( int i=0; ; i++, sourceIndex++ ) { if( ! IsIdentifierChar( source[sourceIndex] ) ) { token[i] = 0; break; } token[i] = source[sourceIndex]; } std::string resultToken = token; free( token ); return resultToken; }