My program is accepting user input and then taking the first word inputted and comparing it to an array of accepted commands. What would be the best way to compare the first word inputted (after it has been tokenized) to an array of strings?
Example:
comparing the string "pwd"
to an array containging {"wait", "pwd", "cd", "exit"}
Thanks in advance for your help!