code: public static StreamEx<String> split(CharSequence str, String regex) {
          if (str.length() == 0)
              return of("");
          if (regex.isEmpty()) {
              return IntStreamEx.ofChars(str).mapToObj(ch -> new String(new char[] { (char) ch }));
          }
          char ch = regex.charAt(0);
          if (regex.length() == 1 && ".$|()[{^?*+\\".indexOf(ch) == -1) {
              return split(str, ch);
          } else if (regex.length() == 2 && ch == '\\') {
              ch = regex.charAt(1);
              if ((ch < '0' || ch > '9') && (ch < 'A' || ch > 'Z') && (ch < 'a' || ch > 'z')
                  && (ch < Character.MIN_HIGH_SURROGATE || ch > Character.MAX_LOW_SURROGATE)) {
                  return split(str, ch);
              }
          }
          return new StreamEx<>(Pattern.compile(regex).splitAsStream(str), StreamContext.SEQUENTIAL);
      }
docs: Creates a stream from the given input sequence around matches of the
  given pattern represented as String.
  
  <p>
  This method is equivalent to
  {@code StreamEx.split(str, Pattern.compile(regex))}.
  
  @param str The character sequence to be split
  @param regex The regular expression String to use for splitting
  
  @return The stream of strings computed by splitting the input around
  matches of this pattern
  @see Pattern#splitAsStream(CharSequence)
  @see #split(CharSequence, char)