internal/encoder/text
Values
pub fn encode_string(
encode string: String,
enforce field_type: encoding.FieldType,
with mode: encoding.EncodingMode,
start position: Int,
preferred_size preferred_size: Int,
maximum_size maximum_size: Int,
) -> Result(List(String), encoding.EncoderError)
Quoted string encode a string, using the specified encoding mode, taking the preferred line size and maximum line size into account, and pretending to start the first line at the passed start position.
pub fn estimate_encoded_size(
of string: String,
enforce field_type: encoding.FieldType,
with mode: encoding.EncodingMode,
maximum_size maximum_size: Int,
) -> Result(Int, encoding.EncoderError)
Estimates the quoted string encoded the size of string in bytes, taking the encoding mode and the maximum size of a line into account.