summaryrefslogtreecommitdiff
path: root/libutils/String16.cpp
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2016-05-09 14:43:31 +0100
committerMichael Wright <michaelwr@google.com>2016-05-09 19:45:07 +0100
commit5bacef33c91e9625dfd09ecf638c2de7faecd34e (patch)
tree545ac749f183ec37edc89eb5e2066427cc0457fa /libutils/String16.cpp
parentea41a18c933d20264b89fc89febf387231dc0c24 (diff)
Add String16#contains and strstr16 methods.
These are needed for aapt to find javadoc comments that contain "@removed" in order to skip them when printing styleable docs. Bug: 28663748 Change-Id: I8866d2167c41e11d6c2586da369560d5815fd13e
Diffstat (limited to 'libutils/String16.cpp')
-rw-r--r--libutils/String16.cpp5
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();