docs: public static String[] splitString(final String s, final char c) {
      final char[] chars = s.toCharArray();
      int num_substrings = 1;
      for (final char x : chars) {
        if (x == c) {
          num_substrings++;
        }
      }
      final String[] result = new String[num_substrings];
      final int len = chars.length;
      int start = 0;  // starting index in chars of the current substring.
      int pos = 0;    // current index in chars.
      int i = 0;      // number of the current substring.
      for (; pos < len; pos++) {
        if (chars[pos] == c) {
          result[i++] = new String(chars, start, pos - start);
          start = pos + 1;
        }
      }
      result[i] = new String(chars, start, pos - start);
      return result;
    }