Question: /* Takes as reference parameter a string to be tokenized and returns the first token found Returns the empty string if no token is found

/* Takes as reference parameter a string to be tokenized and returns the first token found Returns the empty string if no token is found The function deletes any leading delimiter and the first token found from the original string Tokenization is based on a delimiter, where a delimiter is the 'It' (tab),' ' (space), ' ' (new line) or 'r' (carriage return) character Example: if the string s is "\t abcd\t\t 345\t *7$ ", the function returns "abcd" as the first token found, and modifies the string s to become "\t\t 345\t 47$ " */ string tokenize (string &); /* Takes as reference parameter a string to be tokenized and returns the first token found Returns the empty string if no token is found The function deletes any leading delimiter and the first token found from the original string Tokenization is based on a delimiter, where a delimiter is the 'It' (tab),' ' (space), ' ' (new line) or 'r' (carriage return) character Example: if the string s is "\t abcd\t\t 345\t *7$ ", the function returns "abcd" as the first token found, and modifies the string s to become "\t\t 345\t 47$ " */ string tokenize (string &)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
