We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed3689d commit bb1ed97Copy full SHA for bb1ed97
src/libcore/str.rs
@@ -2195,6 +2195,16 @@ impl &str: StrSlice {
2195
#[inline]
2196
fn escape_unicode() -> ~str { escape_unicode(self) }
2197
2198
+ /// Returns a string with leading and trailing whitespace removed
2199
+ #[inline]
2200
+ fn trim() -> ~str { trim(self) }
2201
+ /// Returns a string with leading whitespace removed
2202
2203
+ fn trim_left() -> ~str { trim_left(self) }
2204
+ /// Returns a string with trailing whitespace removed
2205
2206
+ fn trim_right() -> ~str { trim_right(self) }
2207
+
2208
2209
pure fn to_unique() -> ~str { self.slice(0, self.len()) }
2210
0 commit comments