util/StringAPI: add raw strcmp() wrapper

This commit is contained in:
Max Kellermann 2018-07-18 17:18:34 +02:00
parent 32290d5eb8
commit b778fb38a9
2 changed files with 14 additions and 0 deletions

View File

@ -127,6 +127,13 @@ UnsafeCopyStringP(char *dest, const char *src) noexcept
#endif
}
gcc_pure gcc_nonnull_all
static inline int
StringCompare(const char *a, const char *b) noexcept
{
return strcmp(a, b);
}
/**
* Checks whether #a and #b are equal.
*/

View File

@ -120,6 +120,13 @@ UnsafeCopyStringP(wchar_t *dest, const wchar_t *src) noexcept
#endif
}
gcc_pure gcc_nonnull_all
static inline int
StringCompare(const wchar_t *a, const wchar_t *b) noexcept
{
return wcscmp(a, b);
}
/**
* Checks whether str1 and str2 are equal.
* @param str1 String 1