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
diff --git a/libutils/String16.cpp b/libutils/String16.cpp
index 6a5273f..65396ca 100644
--- a/libutils/String16.cpp
+++ b/libutils/String16.cpp
@@ -345,6 +345,11 @@
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();