Function mz_repr::adt::char::format_char_str

source ·
fn format_char_str(
    s: &str,
    length: Option<CharLength>,
    fail_on_len: bool,
    white_space: CharWhiteSpace
) -> Result<String, Error>
Expand description

Returns s as a String with options to enforce char and varchar semantics.

Arguments

  • s - The str to format
  • length - An optional maximum length for the string
  • fail_on_len - Return an error if s’s character count exceeds the specified maximum length.
  • white_space - Express how to handle trailing whitespace on s