ART: Fix inefficent find/rfind

Use character instead of string versions where possible.

Bug: 32619234
Test: m test-art-host
Change-Id: Ifa0a68f17cf9fac5a8c15a6a1f1d085f0c8dcdd7
diff --git a/dexlayout/dexlayout_test.cc b/dexlayout/dexlayout_test.cc
index f3b4c86..1658967 100644
--- a/dexlayout/dexlayout_test.cc
+++ b/dexlayout/dexlayout_test.cc
@@ -292,7 +292,7 @@
       if (!::art::Exec(dexlayout_exec_argv, error_msg)) {
         return false;
       }
-      size_t dex_file_last_slash = dex_file.rfind("/");
+      size_t dex_file_last_slash = dex_file.rfind('/');
       std::string dex_file_name = dex_file.substr(dex_file_last_slash + 1);
       std::vector<std::string> unzip_exec_argv =
           { "/usr/bin/unzip", dex_file, "classes.dex", "-d", tmp_dir};
@@ -381,7 +381,7 @@
   bool DexFileLayoutExec(std::string* error_msg) {
     ScratchFile tmp_file;
     std::string tmp_name = tmp_file.GetFilename();
-    size_t tmp_last_slash = tmp_name.rfind("/");
+    size_t tmp_last_slash = tmp_name.rfind('/');
     std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
 
     // Write inputs and expected outputs.
@@ -416,7 +416,7 @@
   bool DexFileLayoutFixedPointExec(std::string* error_msg) {
     ScratchFile tmp_file;
     std::string tmp_name = tmp_file.GetFilename();
-    size_t tmp_last_slash = tmp_name.rfind("/");
+    size_t tmp_last_slash = tmp_name.rfind('/');
     std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
 
     // Unzip the test dex file to the classes.dex destination. It is required to unzip since
@@ -482,7 +482,7 @@
   bool UnreferencedCatchHandlerExec(std::string* error_msg, const char* filename) {
     ScratchFile tmp_file;
     std::string tmp_name = tmp_file.GetFilename();
-    size_t tmp_last_slash = tmp_name.rfind("/");
+    size_t tmp_last_slash = tmp_name.rfind('/');
     std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
 
     // Write inputs and expected outputs.