6#ifndef OKS_CSTRING_CMP_H
7#define OKS_CSTRING_CMP_H
14 inline bool cmp_str1(
const char * s1,
const char s2[2]) {
15 return (*(
const int16_t *)s1 == *(
const int16_t *)s2);
18 inline bool cmp_str2(
const char * s1,
const char s2[3]) {
19 return cmp_str1(s1,s2) && (s1[2] == 0);
22 inline bool cmp_str2n(
const char * s1,
const char s2[2]) {
26 inline bool cmp_str3(
const char * s1,
const char s2[4]) {
27 return (*(
const int32_t *)s1 == *(
const int32_t *)s2);
30 inline bool cmp_str3n(
const char * s1,
const char s2[3]) {
31 return (s1[0] == s2[0]) &&
cmp_str1(s1+1,s2+1);
34 inline bool cmp_str4(
const char * s1,
const char s2[5]) {
35 return (s1[0] == s2[0]) &&
cmp_str3(s1+1,s2+1);
38 inline bool cmp_str4n(
const char * s1,
const char s2[4]) {
42 inline bool cmp_str5(
const char * s1,
const char s2[6]) {
46 inline bool cmp_str5n(
const char * s1,
const char s2[5]) {
47 return cmp_str3(s1,s2) && (s1[4] == s2[4]);
50 inline bool cmp_str6(
const char * s1,
const char s2[7]) {
54 inline bool cmp_str6n(
const char * s1,
const char s2[6]) {
58 inline bool cmp_str7(
const char * s1,
const char s2[8]) {
59 return (*(
const int64_t *)s1 == *(
const int64_t *)s2);
62 inline bool cmp_str7n(
const char * s1,
const char s2[8]) {
66 inline bool cmp_str8(
const char * s1,
const char s2[9]) {
67 return cmp_str7(s1,s2) && (s1[8] == 0);
70 inline bool cmp_str8n(
const char * s1,
const char s2[9]) {
71 return (*(
const int64_t *)s1 == *(
const int64_t *)s2);
74 inline bool cmp_str9(
const char * s1,
const char s2[10]) {
78 inline bool cmp_str10(
const char * s1,
const char s2[11]) {
82 inline bool cmp_str11(
const char * s1,
const char s2[12]) {
86 inline bool cmp_str12(
const char * s1,
const char s2[13]) {
90 inline bool cmp_str13(
const char * s1,
const char s2[14]) {
94 inline bool cmp_str14(
const char * s1,
const char s2[14]) {
98 inline bool cmp_str15(
const char * s1,
const char s2[16]) {
102 inline bool cmp_str16(
const char * s1,
const char s2[17]) {
bool cmp_str8(const char *s1, const char s2[9])
bool cmp_str8n(const char *s1, const char s2[9])
bool cmp_str2n(const char *s1, const char s2[2])
bool cmp_str1(const char *s1, const char s2[2])
bool cmp_str7n(const char *s1, const char s2[8])
bool cmp_str4(const char *s1, const char s2[5])
bool cmp_str6(const char *s1, const char s2[7])
bool cmp_str10(const char *s1, const char s2[11])
bool cmp_str9(const char *s1, const char s2[10])
bool cmp_str5n(const char *s1, const char s2[5])
bool cmp_str3n(const char *s1, const char s2[3])
bool cmp_str13(const char *s1, const char s2[14])
bool cmp_str16(const char *s1, const char s2[17])
bool cmp_str2(const char *s1, const char s2[3])
bool cmp_str15(const char *s1, const char s2[16])
bool cmp_str5(const char *s1, const char s2[6])
bool cmp_str11(const char *s1, const char s2[12])
bool cmp_str3(const char *s1, const char s2[4])
bool cmp_str12(const char *s1, const char s2[13])
bool cmp_str6n(const char *s1, const char s2[6])
bool cmp_str14(const char *s1, const char s2[14])
bool cmp_str7(const char *s1, const char s2[8])
bool cmp_str4n(const char *s1, const char s2[4])