Skip to main content

complete_rows_len

Function complete_rows_len 

Source
pub fn complete_rows_len(
    bytes: &[u8],
    quote_char: Option<u8>,
    comment_prefix: Option<&CommentPrefix>,
    eol_char: u8,
    skip_lines: usize,
) -> usize
Available on crate feature polars-io only.
Expand description

Returns the length of the longest prefix of bytes that only holds complete rows, i.e. up to and including the last eol_char outside of a quoted field. Like skip_lines itself, the first skip_lines lines are split without regard to quoting. Like the CSV reader, a UTF-8 BOM after them is skipped, so that a comment prefix on the next line is found.