Merge pull request #2139 from Jonanin/add_str_len
Add len to str extensions
This commit is contained in:
commit
ce8023b9ac
1 changed files with 3 additions and 0 deletions
|
@ -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`)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue