Sha256: bde0c5e8ef8bdab377ad730d860c20e6547c285ae73d7ef181579df7217c19bb
Contents?: true
Size: 744 Bytes
Versions: 50
Compression:
Stored size: 744 Bytes
Contents
#include "headers.h" bool strequal(const char* const restrict string1, const char* const restrict string2) { u64 i; for (i = 0 ;; ++i) { if (!ARRAY_INDEX(string1, i)) { return !ARRAY_INDEX(string2, i); } if (!ARRAY_INDEX(string2, i)) { return !ARRAY_INDEX(string1, i); } if (ARRAY_INDEX(string1, i) != ARRAY_INDEX(string2, i)) return false; } } bool strnequal(const char* const restrict string1, const char* const restrict string2, const u64 length1, const u64 length2) { u64 i; assert_comparison(string1, !=, NULL); assert_comparison(string2, !=, NULL); if (length1 != length2) return false; i = length1; while (i--) { if (ARRAY_INDEX(string1, i) != ARRAY_INDEX(string2, i)) return false; } return true; }
Version data entries
50 entries across 49 versions & 6 rubygems