code: private final int skipPadding(String text, int position) {
          while (position < text.length() && text.charAt(position) == pad) {
              ++position;
          }
          return position;
      }
docs: Starting at position, advance past a run of pad characters, if any. Return the
  index of the first character after position that is not a pad character. Result is
  >= position.