docs: public List<String> split(String s) {
  
          List<String> result = new ArrayList<String>();
  
          if (s == null) {
              return result;
          }
  
          boolean seenEscape = false;
  
          // Used to detect if the last char was a separator,
          // in which case we append an empty string
          boolean seenSeparator = false;
  
          StringBuilder sb = new StringBuilder();
          for (int i = 0; i < s.length(); i++) {
              seenSeparator = false;
              char c = s.charAt(i);
              if (seenEscape) {
                  if (c == escapeChar || c == separator) {
                      sb.append(c);
                  } else {
                      sb.append(escapeChar).append(c);
                  }
                  seenEscape = false;
              } else {
                  if (c == escapeChar) {
                      seenEscape = true;
                  } else if (c == separator) {
                      if (sb.length() == 0 && convertEmptyToNull) {
                          result.add(null);
                      } else {
                          result.add(sb.toString());
                      }
                      sb.setLength(0);
                      seenSeparator = true;
                  } else {
                      sb.append(c);
                  }
              }
          }
  
          // Clean up
          if (seenEscape) {
              sb.append(escapeChar);
          }
  
          if (sb.length() > 0 || seenSeparator) {
  
              if (sb.length() == 0 && convertEmptyToNull) {
                  result.add(null);
              } else {
                  result.add(sb.toString());
              }
  
          }
  
          return result;
      }