We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82f1b2c commit 38ac809Copy full SHA for 38ac809
src/libcore/str.rs
@@ -2273,6 +2273,7 @@ pub trait StrSlice {
2273
pure fn to_owned(&self) -> ~str;
2274
pure fn to_managed(&self) -> @str;
2275
pure fn char_at(&self, i: uint) -> char;
2276
+ fn to_bytes(&self) -> ~[u8];
2277
}
2278
2279
/// Extension methods for strings
@@ -2416,6 +2417,8 @@ impl StrSlice for &self/str {
2416
2417
2418
#[inline]
2419
pure fn char_at(&self, i: uint) -> char { char_at(*self, i) }
2420
+
2421
+ fn to_bytes(&self) -> ~[u8] { to_bytes(*self) }
2422
2423
2424
pub trait OwnedStr {
0 commit comments