mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-22 20:47:48 +00:00
Add len to str extensions
This commit is contained in:
parent
851fde879d
commit
d621ada003
@ -1783,6 +1783,9 @@ impl extensions for str {
|
||||
"]
|
||||
#[inline]
|
||||
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 = "
|
||||
Returns a slice of the given string from the byte range [`begin`..`end`)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user