util/StringCompare: add API documentation

This commit is contained in:
Max Kellermann 2020-03-22 19:15:55 +01:00
parent adad4c7298
commit 3888bafc1f
2 changed files with 12 additions and 0 deletions

View File

@ -107,6 +107,12 @@ StringStartsWithIgnoreCase(StringView haystack, StringView needle) noexcept
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
static inline const char *
StringAfterPrefixIgnoreCase(const char *haystack, StringView needle) noexcept

View File

@ -91,6 +91,12 @@ StringAfterPrefix(const wchar_t *haystack, WStringView needle) noexcept
: 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
static inline bool
StringStartsWithIgnoreCase(const wchar_t *haystack,