public final static int readRawUntil(final StringBuilder out,final String in,final int start,final char end){
  int pos=start;
  while (pos < in.length()) {
    final char ch=in.charAt(pos);
    if (ch == end) {
      break;
    }
    out.append(ch);
    pos++;
  }
  return (pos == in.length()) ? -1 : pos;
}

public final static int readRawUntil ( final StringBuilder out , final String in , final int start , final char end ) { int pos = start ; while ( pos < in . length ( ) ) { final char ch = in . charAt ( pos ) ; if ( ch == end ) { break ; } out . append ( ch ) ; pos ++ ; } return ( pos == in . length ( ) ) ? - 1 : pos ; }
reads characters until the end character is encountered , ignoring escape sequences .
