Merge pull request #2139 from Jonanin/add_str_len
Add len to str extensions
This commit is contained in:
@@ -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`)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user