From subsecret
Jump to: navigation, search

Bash like String Splitter

When needing to parse a string into arguments in Java, many simply use String.split(" ");. However this fails to handle string with quotes, escaped quotes, and so on. The UNIX Bash shell has a very simply/efficient/meaningful way of splitting program arguments. This simple java class mimics the way UNIX shell splits strings.


   //Split String into array (bash compatible)
   List<String> splitString = StringSplitter.split(...);


Date Version File Description
29. December 2013 1.00 Initial release


No license. Do whatever you want with it.