Skip to content

Instantly share code, notes, and snippets.

@GMadorell
Created October 22, 2013 14:31
Show Gist options
  • Select an option

  • Save GMadorell/7101751 to your computer and use it in GitHub Desktop.

Select an option

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.
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