Function konst::string::trim

source ·
pub const fn trim(this: &str) -> &str
Expand description

A const subset of str::trim which only removes ascii whitespace.

§Example

use konst::string;

const TRIMMED: &str = string::trim("\nhello world  ");

assert_eq!(TRIMMED, "hello world");