core::str rename [r]index -> [r]index_bytes
This commit is contained in:
parent
4339307359
commit
a131b430a0
7 changed files with 22 additions and 20 deletions
|
|
@ -284,7 +284,7 @@ fn check_variants_T<T: copy>(
|
|||
}
|
||||
|
||||
fn last_part(filename: str) -> str unsafe {
|
||||
let ix = str::rindex(filename, 47u8 /* '/' */);
|
||||
let ix = str::rindex_byte(filename, 47u8 /* '/' */);
|
||||
assert ix >= 0;
|
||||
str::unsafe::slice_bytes(filename, ix as uint + 1u, str::byte_len(filename) - 3u)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue