summaryrefslogtreecommitdiffstats
path: root/base/strings.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-01-13 18:51:32 -0800
committerElliott Hughes <enh@google.com>2017-01-13 18:51:32 -0800
commit2140782d241375db1ad93ee4f5ef5835355ac94b (patch)
tree64c63fcd46f4819adda9ec01452afe514670a9a1 /base/strings.cpp
parent3052d123a85442deb7b2048753ebab3adc7dded0 (diff)
downloadsystem_core-2140782d241375db1ad93ee4f5ef5835355ac94b.tar.gz
system_core-2140782d241375db1ad93ee4f5ef5835355ac94b.tar.bz2
system_core-2140782d241375db1ad93ee4f5ef5835355ac94b.zip
bootable/recovery wants EqualsIgnoreCase.
Bug: N/A Test: ran tests Change-Id: I4a6ee9eba0514b8bb8fb0489f4d370964ce9c1c2
Diffstat (limited to 'base/strings.cpp')
-rw-r--r--base/strings.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/strings.cpp b/base/strings.cpp
index 7a94ad78c..46fe93995 100644
--- a/base/strings.cpp
+++ b/base/strings.cpp
@@ -112,5 +112,9 @@ bool EndsWithIgnoreCase(const std::string& s, const char* suffix) {
return EndsWith(s, suffix, false);
}
+bool EqualsIgnoreCase(const std::string& lhs, const std::string& rhs) {
+ return strcasecmp(lhs.c_str(), rhs.c_str()) == 0;
+}
+
} // namespace base
} // namespace android