libcore: str trim functions can be applied to &strs

This commit is contained in:
Erick Tryzelaar 2012-10-08 08:06:25 -07:00
parent ed3689d57c
commit bb1ed97ca2

View File

@ -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()) }