std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null

This commit is contained in:
Erick Tryzelaar 2013-07-23 16:56:17 -07:00
parent 7434080dd7
commit 9ad815e063
3 changed files with 8 additions and 9 deletions

View file

@ -26,7 +26,7 @@ mod libc {
fn strlen(str: ~str) -> uint {
unsafe {
// C string is terminated with a zero
let bytes = str.as_bytes_with_null_consume();
let bytes = str.to_bytes_with_null();
return libc::my_strlen(vec::raw::to_ptr(bytes));
}
}