code: public 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;
    }
docs: Reads characters until the end character is encountered, ignoring escape
  sequences.
  
  @param out
  The StringBuilder to write to.
  @param in
  The Input String.
  @param start
  Starting position.
  @param end
  End characters.
  @return The new position or -1 if no 'end' char was found.