docs: private int countNonNewline(String str, int off, int len) {
      for(int cnt = 0; cnt < len; cnt++) {
        final int pos = off + cnt;
        if(str.charAt(pos) == UNIX_NEWLINE) {
          return cnt;
        }
        if(str.charAt(pos) == CARRIAGE_RETURN) {
          return cnt;
        }
      }
      return len;
    }