src/com/mlhsoftware/commandline/model/CmdTokener.java
public String nextString( char quote ) throws TokenException
  {
    char c;
    StringBuffer sb = new StringBuffer();
    for ( ; ; )
    {
      c = next();
      switch ( c )
      {
        case 0:
        case '\n':
        case '\r':
        {
          throw syntaxError( "Unterminated string" );
        }
        case '\\':
        {
          c = next();
          switch ( c )
          {
            case 'b':
            {
              sb.append( '\b' );
              break;
            }
            case 't':
            {
              sb.append( '\t' );
              break;
            }
            case 'n':
            {
              sb.append( '\n' );
              break;
            }
            case 'f':
            {
              sb.append( '\f' );
              break;
            }
            case 'r':
            {
              sb.append( '\r' );
              break;
            }
            case 'u':
            {
              sb.append( (char)Integer.parseInt( next( 4 ), 16 ) );
              break;
            }
            case 'x':
            {
              sb.append( (char)Integer.parseInt( next( 2 ), 16 ) );
              break;
            }
            default:
            {
              sb.append( c );
              break;
            }
          }
          break;
        }
        default:
        {
          if ( c == quote )
          {
            return sb.toString();
          }
          sb.append( c );
        }
      }
    }
  }
/**
     * Return the characters up to the next close quote character.
     * Backslash processing is done. The formal JSON format does not
     * allow strings in single quotes, but an implementation is allowed to
     * accept them.
     * @param quote The quoting character, either
     *      <code>"</code>&nbsp;<small>(double quote)</small> or
     *      <code>'</code>&nbsp;<small>(single quote)</small>.
     * @return      A String.
     * @throws FSONException Unterminated string.
     */
Return the characters up to the next close quote character.
Backslash processing is done. The formal JSON format does not
allow strings in single quotes, but an implementation is allowed to
accept them.
@param quote The quoting character, either
" (double quote) or
' (single quote).
@return      A String.
@throws FSONException Unterminated string.
Return the characters up to the next close quote character . Backslash processing is done . The formal JSON format does not allow strings in single quotes but an implementation is allowed to accept them . @param quote The quoting character either " ( double quote ) or ' ( single quote ) . @return A String . @throws FSONException Unterminated string .
public String nextString( char quote ) throws TokenException
  {
    char c;
    StringBuffer sb = new StringBuffer();
    for ( ; ; )
    {
      c = next();
      switch ( c )
      {
        case 0:
        case '\n':
        case '\r':
        {
          throw syntaxError( "Unterminated string" );
        }
        case '\\':
        {
          c = next();
          switch ( c )
          {
            case 'b':
            {
              sb.append( '\b' );
              break;
            }
            case 't':
            {
              sb.append( '\t' );
              break;
            }
            case 'n':
            {
              sb.append( '\n' );
              break;
            }
            case 'f':
            {
              sb.append( '\f' );
              break;
            }
            case 'r':
            {
              sb.append( '\r' );
              break;
            }
            case 'u':
            {
              sb.append( (char)Integer.parseInt( next( 4 ), 16 ) );
              break;
            }
            case 'x':
            {
              sb.append( (char)Integer.parseInt( next( 2 ), 16 ) );
              break;
            }
            default:
            {
              sb.append( c );
              break;
            }
          }
          break;
        }
        default:
        {
          if ( c == quote )
          {
            return sb.toString();
          }
          sb.append( c );
        }
      }
    }
  }
public String nextString ( char quote ) throws TokenException { char c ; StringBuffer sb = new StringBuffer ( ) ; for ( ; ; ) { c = next ( ) ; switch ( c ) { case 0 : case '\n' : case '\r' : { throw syntaxError ( "Unterminated string" ) ; } case '\\' : { c = next ( ) ; switch ( c ) { case 'b' : { sb . append ( '\b' ) ; break ; } case 't' : { sb . append ( '\t' ) ; break ; } case 'n' : { sb . append ( '\n' ) ; break ; } case 'f' : { sb . append ( '\f' ) ; break ; } case 'r' : { sb . append ( '\r' ) ; break ; } case 'u' : { sb . append ( ( char ) Integer . parseInt ( next ( 4 ) , 16 ) ) ; break ; } case 'x' : { sb . append ( ( char ) Integer . parseInt ( next ( 2 ) , 16 ) ) ; break ; } default : { sb . append ( c ) ; break ; } } break ; } default : { if ( c == quote ) { return sb . toString ( ) ; } sb . append ( c ) ; } } } }
Return the characters up to the next close quote character.
Return the characters up to the next close quote character .