libcore: str trim functions can be applied to &strs
This commit is contained in:
parent
ed3689d57c
commit
bb1ed97ca2
@ -2195,6 +2195,16 @@ fn escape_default() -> ~str { escape_default(self) }
|
||||
#[inline]
|
||||
fn escape_unicode() -> ~str { escape_unicode(self) }
|
||||
|
||||
/// Returns a string with leading and trailing whitespace removed
|
||||
#[inline]
|
||||
fn trim() -> ~str { trim(self) }
|
||||
/// Returns a string with leading whitespace removed
|
||||
#[inline]
|
||||
fn trim_left() -> ~str { trim_left(self) }
|
||||
/// Returns a string with trailing whitespace removed
|
||||
#[inline]
|
||||
fn trim_right() -> ~str { trim_right(self) }
|
||||
|
||||
#[inline]
|
||||
pure fn to_unique() -> ~str { self.slice(0, self.len()) }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user