From 5bacef33c91e9625dfd09ecf638c2de7faecd34e Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 9 May 2016 14:43:31 +0100 Subject: 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 --- libutils/String16.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libutils/String16.cpp') 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(); -- cgit v1.2.3