method str.trim
The text without leading and trailing whitespace.
Example:
fn main() io {
print("[{" padded \n".trim()}]")
}Output
[padded]
Removes whitespace at both ends.
Example:
fn main() io {
print("[{" hi \n".trim()}]")
}Output
[hi]
pub(api) fn trim() -> strComplexity. O(n).
Since. 1.0.0-beta
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:403