Detailed Method Reference

Namespace: Canley.Utility.CSV
Class: CanleyCSVReader

Load

public void Load(string rawData)
  • Description: The primary entry point for the parser. It processes the raw string character-by-character, automatically handling BOM stripping and RFC 4180 escaping rules.

  • Workflow:

    1. BOM Check: Scans the start of the string for Byte Order Marks and offsets the parser to avoid corrupted headers.
    2. State Machine: Iterates through each character to identify delimiters, enclosure quotes, and line breaks.
    3. Grid Population: Builds the internal List<string[]> structure based on the parsed tokens.
  • Parameters:

    • rawData: The raw string content to be parsed into the reader.
  • Returns: void

  • Example:

reader.Load(csvTextAsset.text);