Commit 63784026 authored by Max Kellermann's avatar Max Kellermann

util/WStringCompare: reorder functions to relocate API docs

parent 3888bafc
...@@ -91,6 +91,14 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept ...@@ -91,6 +91,14 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept
: nullptr; : nullptr;
} }
gcc_pure gcc_nonnull_all
static inline bool
StringStartsWithIgnoreCase(const wchar_t *haystack,
WStringView needle) noexcept
{
return StringIsEqualIgnoreCase(haystack, needle.data, needle.size);
}
/** /**
* Returns the portion of the string after a prefix. If the string * Returns the portion of the string after a prefix. If the string
* does not begin with the specified prefix, this function returns * does not begin with the specified prefix, this function returns
...@@ -98,11 +106,12 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept ...@@ -98,11 +106,12 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept
* This function is case-independent. * This function is case-independent.
*/ */
gcc_pure gcc_nonnull_all gcc_pure gcc_nonnull_all
static inline bool static inline const wchar_t *
StringStartsWithIgnoreCase(const wchar_t *haystack, StringAfterPrefixIgnoreCase(const wchar_t *haystack, WStringView needle) noexcept
WStringView needle) noexcept
{ {
return StringIsEqualIgnoreCase(haystack, needle.data, needle.size); return StringStartsWithIgnoreCase(haystack, needle)
? haystack + needle.size
: nullptr;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment