core::str rename [r]index -> [r]index_bytes

This commit is contained in:
Kevin Cantu 2012-02-11 01:57:39 -08:00
parent 4339307359
commit a131b430a0
7 changed files with 22 additions and 20 deletions

View file

@ -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)
}