code: private static int retroTrim(char[] res, int resI) {
      int i = resI;
      while (i >= 1) {
        if (!istrimmable(res[i - 1])) {
          return i;
        }
        i--;
      }
      return i;
    }
docs: Reads from index {@code resI} to the beginning into {@code res} looking up the location of the trimmable char with
  the lowest index before encountering a non-trimmable char.
  <p>
  This basically trims {@code res} from any trimmable char at its end.
  
  @return index of next location to put new char in res