code: public static String[] split(String str, String theSplitter) {
          if (StringUtil.isEmpty(str)) {
              return new String[0];
          }
          return str.trim().split("\\s*" + escapeSpecialChar(theSplitter) + "\\s*");
      }
docs: split the given string into an array with the given splitter.
  note that all elements in the returned array are trimmed.
  
  @param str         the string to be split, if null the split result is en empty string array.
  @param theSplitter theSplitter, regex special character will be escaped.
  @return spitted array or empty array if the input string is empty.