std::string::size_typetokenStartIndex{words.find_first_not_of(Characters::WHITESPACE)};//start of token
std::string::size_typetokenEndIndex{words.find_first_of(Characters::WHITESPACE,tokenStartIndex)};//first whitespace after token
while(tokenStartIndex!=std::string::npos)//no more things to tokenize
{
//tokenize
if(tokenEndIndex==std::string::npos)//if there is no more white space (last token in string)
word={words.substr(tokenStartIndex)};//tokenize from last whitespace to end of string
else
word={words.substr(tokenStartIndex,tokenEndIndex-tokenStartIndex)};//tokenize between start of token the and next found whitespace (2nd param is count between the two)
else//tokenize between start of token the and next found whitespace (2nd param is count between the two)