libcore: Remove as_bytes_slice

This commit is contained in:
Patrick Walton 2012-09-03 12:33:18 -07:00
parent 68704e4ca7
commit c2f8cf9dc1

View File

@ -24,6 +24,7 @@
// Reinterpretation
as_bytes,
as_bytes_slice,
as_buf,
as_c_str,
@ -1751,6 +1752,10 @@ fn is_alphanumeric(s: &str) -> bool {
}
}
pure fn as_bytes_slice(s: &a/str) -> &a/[u8] {
unsafe { ::unsafe::reinterpret_cast(&s) }
}
/**
* Work with the byte buffer of a string as a null-terminated C string.
*