std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null
This commit is contained in:
parent
7434080dd7
commit
9ad815e063
3 changed files with 8 additions and 9 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue