File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2263,6 +2263,7 @@ pub trait StrSlice {
2263
2263
pure fn is_whitespace(&self) -> bool;
2264
2264
pure fn is_alphanumeric(&self) -> bool;
2265
2265
pure fn len(&self) -> uint;
2266
+ pure fn char_len(&self) -> uint;
2266
2267
pure fn slice(&self, begin: uint, end: uint) -> ~str;
2267
2268
pure fn split(&self, sepfn: &fn(char) -> bool) -> ~[~str];
2268
2269
pure fn split_char(&self, sep: char) -> ~[~str];
@@ -2343,9 +2344,12 @@ impl StrSlice for &'self str {
2343
2344
*/
2344
2345
#[inline]
2345
2346
pure fn is_alphanumeric(&self) -> bool { is_alphanumeric(*self) }
2346
- #[inline]
2347
2347
/// Returns the size in bytes not counting the null terminator
2348
+ #[inline]
2348
2349
pure fn len(&self) -> uint { len(*self) }
2350
+ /// Returns the number of characters that a string holds
2351
+ #[inline]
2352
+ pure fn char_len(&self) -> uint { char_len(*self) }
2349
2353
/**
2350
2354
* Returns a slice of the given string from the byte range
2351
2355
* [`begin`..`end`)
You can’t perform that action at this time.
0 commit comments