Detailed Method Reference
Namespace: Canley.Utility.CSV
Class: CanleyCSVReader
Validate
public bool Validate(out string report)-
Description: Performs a deep structural check. It ensures every row matches the column count of the header (Row 0).
-
Workflow:
- Baseline Establishment: Records the length of Row 0 to use as the requirement for all subsequent rows.
- Iterative Audit: Loops through the entire grid, comparing each row’s length to the baseline.
- Report Generation: Appends specific row indices and discrepancy details to the
reportstring if a mismatch is found.
-
Parameters:
report: Anoutstring containing a detailed row-by-row error report.
-
Returns:
bool(True if the file is perfectly consistent). -
Example:
if (!csvManager.Reader.Validate(out string report))
{
Debug.LogWarning("CSV Structure Error: " + report);
}