docs: public static Partial unescape(String input, char echar, char[] allowEscaped, char[] delimiter) {
  
          StringBuilder component = new StringBuilder();
          boolean escaped = false;
          Character doneDelimiter = null;
          boolean done = false;
          String allowed = String.valueOf(allowEscaped != null ? allowEscaped : new char[0]) +
                           echar +
                           String.valueOf(delimiter != null ? delimiter : new char[0]);
          char[] array = input.toCharArray();
          int i;
          for (i = 0; i < array.length && !done; i++) {
              char c = array[i];
              if (c == echar) {
                  if (escaped) {
                      component.append(echar);
                      escaped = false;
                  } else {
                      escaped = true;
                  }
              } else if (allowed.indexOf(c) >= 0) {
                  if (escaped) {
                      component.append(c);
                      escaped = false;
                  } else {
                      boolean delimFound = false;
                      if (null != delimiter) {
                          for (final char aDelimiter : delimiter) {
                              if (c == aDelimiter) {
                                  delimFound = true;
                                  doneDelimiter = aDelimiter;
                                  done = true;
                                  break;
                              }
                          }
                      }
                      if (!delimFound) {
                          //append
                          component.append(c);
                      }
                  }
              } else {
                  if (escaped) {
                      component.append(echar);
                      escaped = false;
                  }
  
                  component.append(c);
              }
          }
          String rest = i <= array.length - 1 ? new String(array, i, array.length - i) : null;
  
          return new Partial(component.toString(), doneDelimiter, rest);
      }