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 @@ export
// Reinterpretation
as_bytes,
as_bytes_slice,
as_buf,
as_c_str,
@ -1751,6 +1752,10 @@ pure fn as_bytes<T>(s: ~str, f: fn(~[u8]) -> T) -> T {
}
}
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.
*