diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-18 19:46:27 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-18 20:16:07 +0100 |
commit | 24eae2b75c201292990122e69954072f36b6f218 (patch) | |
tree | 75dadb6f93794056a7e063f1a5f5c74d1ba7dff5 /comphelper/inc | |
parent | a413f18e5be4e95ceaf7cb4335ca9f62ec9693a5 (diff) |
add comphelper::string::indexOfAny()
to replace String::SearchChar()
Change-Id: If5476e94be1255247918584cf1923d408ad75064
Diffstat (limited to 'comphelper/inc')
-rw-r--r-- | comphelper/inc/comphelper/string.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index cfa9ddd474f6..6e28895f7d90 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -285,6 +285,17 @@ COMPHELPER_DLLPUBLIC inline rtl::OUStringBuffer& padToLength( return detail::padToLength(rBuffer, nLength, cFill); } +/** Find any of a list of code units in the string. + @param rIn OUString to search + @param pChars 0-terminated array of sal_Unicode code units to search for + @param nPos start position + + @return position of first occurrence of any of the elements of pChars + or -1 if none of the code units occur in the string + */ +COMPHELPER_DLLPUBLIC sal_Int32 indexOfAny(rtl::OUString const& rIn, + sal_Unicode const*const pChars, sal_Int32 const nPos = 0); + /** Convert a sequence of strings to a single comma separated string. Note that no escaping of commas or anything fancy is done. |