Function repr::adt::char::format_str_trim[][src]

pub fn format_str_trim(
    s: &str,
    length: Option<usize>,
    fail_on_len: bool
) -> Result<String, Error>
Expand description

Ensures that s has fewer than length characters, and returns a String version of it with all whitespace trimmed from the end.

The value returned is appropriate to store in Datum::String, but is not appropriate to return to clients.