StringBuilder fwdQuote ( char q ) { StringBuilder sb = new StringBuilder ( ) ; while ( hasNext ( ) ) { next ( ) ; sb . append ( buffer [ pos ] ) ; if ( isCurr ( q ) ) { if ( isNext ( q ) ) { // consecutive quote sign next ( ) ; } else { break ; } } } if ( sb . length ( ) > 0 ) sb . setLength ( sb . length ( ) - 1 ) ; // remove closing quote sign return sb ; }
forward pos until the end of quote