1#ifndef OKS_CSTRING_CMP_H
2#define OKS_CSTRING_CMP_H
9 inline bool cmp_str1(
const char * s1,
const char s2[2]) {
10 return (*(
const int16_t *)s1 == *(
const int16_t *)s2);
13 inline bool cmp_str2(
const char * s1,
const char s2[3]) {
14 return cmp_str1(s1,s2) && (s1[2] == 0);
17 inline bool cmp_str2n(
const char * s1,
const char s2[2]) {
21 inline bool cmp_str3(
const char * s1,
const char s2[4]) {
22 return (*(
const int32_t *)s1 == *(
const int32_t *)s2);
25 inline bool cmp_str3n(
const char * s1,
const char s2[3]) {
26 return (s1[0] == s2[0]) &&
cmp_str1(s1+1,s2+1);
29 inline bool cmp_str4(
const char * s1,
const char s2[5]) {
30 return (s1[0] == s2[0]) &&
cmp_str3(s1+1,s2+1);
33 inline bool cmp_str4n(
const char * s1,
const char s2[4]) {
37 inline bool cmp_str5(
const char * s1,
const char s2[6]) {
41 inline bool cmp_str5n(
const char * s1,
const char s2[5]) {
42 return cmp_str3(s1,s2) && (s1[4] == s2[4]);
45 inline bool cmp_str6(
const char * s1,
const char s2[7]) {
49 inline bool cmp_str6n(
const char * s1,
const char s2[6]) {
53 inline bool cmp_str7(
const char * s1,
const char s2[8]) {
54 return (*(
const int64_t *)s1 == *(
const int64_t *)s2);
57 inline bool cmp_str7n(
const char * s1,
const char s2[8]) {
61 inline bool cmp_str8(
const char * s1,
const char s2[9]) {
62 return cmp_str7(s1,s2) && (s1[8] == 0);
65 inline bool cmp_str8n(
const char * s1,
const char s2[9]) {
66 return (*(
const int64_t *)s1 == *(
const int64_t *)s2);
69 inline bool cmp_str9(
const char * s1,
const char s2[10]) {
73 inline bool cmp_str10(
const char * s1,
const char s2[11]) {
77 inline bool cmp_str11(
const char * s1,
const char s2[12]) {
81 inline bool cmp_str12(
const char * s1,
const char s2[13]) {
85 inline bool cmp_str13(
const char * s1,
const char s2[14]) {
89 inline bool cmp_str14(
const char * s1,
const char s2[14]) {
93 inline bool cmp_str15(
const char * s1,
const char s2[16]) {
97 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])