For parsing player commands, I’ve most often used the split method to split a string by delimiters and then to then just figure out the rest by a series of ifs or switches. What are some different ways of parsing strings in Java?
For parsing player commands, I’ve most often used the split method to split a
Share
I assume you’re trying to make the command interface as forgiving as possible. If this is the case, I suggest you use an algorithm similar to this: