CsvQuoteState

Implements a quote string state object for CSV streams.

Implements: IQuoteState

Description

The CsvQuoteState implements a quote string state object for CSV streams.

Instance methods

decodeString

Decodes a string value.

public decodeString(value: string, quoteSymbol: number): string

  • value: string - string value to be decoded.
  • quoteSymbol: number - string quote character.
  • returns: string - An decoded string.

encodeString

Encodes a string value.

public encodeString(value: string, quoteSymbol: number): string

  • value: string - string value to be encoded.
  • quoteSymbol: number - string quote character.
  • returns: string - encoded string.

nextToken

Gets the next token from the stream started from the character linked to this state.

public nextToken(scanner: IScanner, tokenizer: ITokenizer): Token

  • scanner: IScanner - textual string to be tokenized.
  • tokenizer: ITokenizer - tokenizer class that controls the process.
  • returns: Token - next token from the top of the stream.