about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-11 01:57:39 -0800
committerKevin Cantu <me@kevincantu.org>2012-02-11 16:39:39 -0800
commita131b430a0e2e227c8771212dc5f469cd08e5dce (patch)
tree78212a18a6b3404c2283cb96d796168418479456 /src/libstd
parent4339307359eaca1ae1fd5de96eec746e96a90564 (diff)
downloadrust-a131b430a0e2e227c8771212dc5f469cd08e5dce.tar.gz
rust-a131b430a0e2e227c8771212dc5f469cd08e5dce.zip
core::str rename [r]index -> [r]index_bytes
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs8
-rw-r--r--src/libstd/getopts.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 2304445b95b..874d92cc4b9 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -44,9 +44,9 @@ The dirname of "/usr/share" will be "/usr", but the dirname of
 If the path is not prefixed with a directory, then "." is returned.
 */
 fn dirname(p: path) -> path unsafe {
-    let i: int = str::rindex(p, os_fs::path_sep as u8);
+    let i: int = str::rindex_byte(p, os_fs::path_sep as u8);
     if i == -1 {
-        i = str::rindex(p, os_fs::alt_path_sep as u8);
+        i = str::rindex_byte(p, os_fs::alt_path_sep as u8);
         if i == -1 { ret "."; }
     }
     ret str::unsafe::slice_bytes(p, 0u, i as uint);
@@ -64,9 +64,9 @@ the provided path. If an empty path is provided or the path ends
 with a path separator then an empty path is returned.
 */
 fn basename(p: path) -> path unsafe {
-    let i: int = str::rindex(p, os_fs::path_sep as u8);
+    let i: int = str::rindex_byte(p, os_fs::path_sep as u8);
     if i == -1 {
-        i = str::rindex(p, os_fs::alt_path_sep as u8);
+        i = str::rindex_byte(p, os_fs::alt_path_sep as u8);
         if i == -1 { ret p; }
     }
     let len = str::byte_len(p);
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index 48d83f0e5c2..33674fe67f3 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -230,7 +230,7 @@ fn getopts(args: [str], opts: [opt]) -> result unsafe {
             let i_arg = option::none::<str>;
             if cur[1] == '-' as u8 {
                 let tail = str::unsafe::slice_bytes(cur, 2u, curlen);
-                let eq = str::index(tail, '=' as u8);
+                let eq = str::index_byte(tail, '=' as u8);
                 if eq == -1 {
                     names = [long(tail)];
                 } else {