diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2016-05-16 13:21:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-05-16 13:21:11 +0000 |
commit | 8b452b876b90dcfff1dab9012b65b5e67c4531a4 (patch) | |
tree | 11453ade4ba6c05f8556d610fe824b2cc443570b /libutils/String16.cpp | |
parent | c337cae9adcb538a4562641f97bdde933d085a82 (diff) | |
parent | 5bacef33c91e9625dfd09ecf638c2de7faecd34e (diff) |
Merge "Add String16#contains and strstr16 methods." into nyc-dev
Diffstat (limited to 'libutils/String16.cpp')
-rw-r--r-- | libutils/String16.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libutils/String16.cpp b/libutils/String16.cpp index 6a5273ff2..65396caca 100644 --- a/libutils/String16.cpp +++ b/libutils/String16.cpp @@ -345,6 +345,11 @@ bool String16::startsWith(const char16_t* prefix) const return strncmp16(mString, prefix, ps) == 0; } +bool String16::contains(const char16_t* chrs) const +{ + return strstr16(mString, chrs) != nullptr; +} + status_t String16::makeLower() { const size_t N = size(); |