Merge pull request #2139 from Jonanin/add_str_len

Add len to str extensions
This commit is contained in:
Brian Anderson 2012-04-05 23:49:55 -07:00
commit ce8023b9ac

View file

@ -1783,6 +1783,9 @@ impl extensions for str {
"] "]
#[inline] #[inline]
fn is_whitespace() -> bool { is_whitespace(self) } fn is_whitespace() -> bool { is_whitespace(self) }
#[inline]
#[doc ="Returns the size in bytes not counting the null terminator"]
fn len() -> uint { len(self) }
#[doc = " #[doc = "
Returns a slice of the given string from the byte range [`begin`..`end`) Returns a slice of the given string from the byte range [`begin`..`end`)