code: public static String[] extractList(String input, char delimiter) {
          int end = input.indexOf(delimiter);
          if (-1 == end) {
              return new String[] { input.trim() };
          }
          List<String> output = new LinkedList<String>();
          int start = 0;
          do {
              output.add(input.substring(start, end).trim());
              start = end + 1;
              end = input.indexOf(delimiter, start);
          } while (-1 != end);
          // copy the last value if it exists
          if (start < input.length()) {
              output.add(input.substring(start).trim());
          }
          return output.toArray(new String[output.size()]);
      }
docs: Convert the input string to a list of strings based on the
  provided delimiter.
  
  @param input
  @param delimiter
  @return String[]