If the string is a C-string (zero terminated character array) then the string function strtok() will separate the pieces.