util/StringCompare: use StringAPI.hxx

This commit is contained in:
Max Kellermann
2018-08-20 15:33:16 +02:00
parent 75c836fbd9
commit e85b9960f0
2 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -31,6 +31,7 @@
#define STRING_COMPARE_HXX
#include "StringView.hxx"
#include "StringAPI.hxx"
#include "Compiler.h"
#ifdef _UNICODE
@@ -47,7 +48,7 @@ gcc_pure gcc_nonnull_all
static inline bool
StringStartsWith(const char *haystack, StringView needle) noexcept
{
return strncmp(haystack, needle.data, needle.size) == 0;
return StringIsEqual(haystack, needle.data, needle.size);
}
gcc_pure