trim_and_append_str

Function trim_and_append_str 

Source
fn trim_and_append_str<'a>(
    src_str_opt: Option<&'a str>,
    trim_characters_opt: Option<&'a str>,
    trim_func: fn(&'a str, &'a str) -> (&'a str, u32),
    views_buf: &mut Vec<u128>,
    null_builder: &mut NullBufferBuilder,
    original_view: &u128,
)
Expand description

Trims the given string and appends the trimmed string to the views buffer and the null buffer.

Calls trim_func on the string value in original_view, for non_null values and appends the updated view to the views buffer / null_builder.

Arguments

  • src_str_opt: The original string value (represented by the view)
  • trim_characters_opt: The characters to trim from the string
  • trim_func: The function to apply to the string (see string_view_trim for details)
  • views_buf: The buffer to append the updated views to
  • null_builder: The buffer to append the null values to
  • original_view: The original view value (that contains src_str_opt)