Implements a quote string state object for CSV streams.
Description
The CsvQuoteState implements a quote string state object for CSV streams.
Constructors
NewCsvQuoteState
Creates new instance.
NewCsvQuoteState() *CsvQuoteState
Methods
DecodeString
Decodes a string value.
(c *CsvQuoteState) DecodeString(value string, quoteSymbol rune) string
- value: string - string value to be decoded.
- quoteSymbol: rune - string quote character.
- returns: string - decoded string value.
EncodeString
Encodes a string value.
(c *CsvQuoteState) EncodeString(value string, quoteSymbol rune) string
- value: string - string value to be encoded.
- quoteSymbol: rune - string quote character.
- returns: string - encoded string.
nextToken
Gets the next token from the stream started from the character linked to this state.
(c *CsvQuoteState) 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.