Add len to str extensions

This commit is contained in:
Jon Morton 2012-04-06 01:12:49 -05:00
parent 851fde879d
commit d621ada003

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`)