parquet::column::writer

Function truncate_utf8

Source
fn truncate_utf8(data: &str, length: usize) -> Option<Vec<u8>>
Expand description

Truncate a UTF8 slice to the longest prefix that is still a valid UTF8 string, while being less than length bytes and non-empty