Commit 3888bafc authored by Max Kellermann's avatar Max Kellermann

util/StringCompare: add API documentation

parent adad4c72
...@@ -107,6 +107,12 @@ StringStartsWithIgnoreCase(StringView haystack, StringView needle) noexcept ...@@ -107,6 +107,12 @@ StringStartsWithIgnoreCase(StringView haystack, StringView needle) noexcept
StringIsEqualIgnoreCase(haystack.data, needle.data, needle.size); StringIsEqualIgnoreCase(haystack.data, needle.data, needle.size);
} }
/**
* Returns the portion of the string after a prefix. If the string
* does not begin with the specified prefix, this function returns
* nullptr.
* This function is case-independent.
*/
gcc_pure gcc_nonnull_all gcc_pure gcc_nonnull_all
static inline const char * static inline const char *
StringAfterPrefixIgnoreCase(const char *haystack, StringView needle) noexcept StringAfterPrefixIgnoreCase(const char *haystack, StringView needle) noexcept
......
...@@ -91,6 +91,12 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept ...@@ -91,6 +91,12 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept
: nullptr; : nullptr;
} }
/**
* Returns the portion of the string after a prefix. If the string
* does not begin with the specified prefix, this function returns
* nullptr.
* This function is case-independent.
*/
gcc_pure gcc_nonnull_all gcc_pure gcc_nonnull_all
static inline bool static inline bool
StringStartsWithIgnoreCase(const wchar_t *haystack, StringStartsWithIgnoreCase(const wchar_t *haystack,
......
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