Created
October 22, 2013 14:31
-
-
Save GMadorell/7101751 to your computer and use it in GitHub Desktop.
Split a string into the given symbols.
This was hard because some symbols can be tracted as a regex if they aren't scaped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String[] splitString(String objective, String symbols) { | |
| return objective.split(Pattern.quote(symbols)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment