689
inline static char my_toupper(const charset_info_st *s, char c)
691
return (char)(s->to_upper[(unsigned char)c]);
694
inline static char my_tolower(const charset_info_st *s, char c)
696
return (char)(s->to_lower[(unsigned char)c]);
699
inline static bool my_isalpha(const charset_info_st *s, char c)
701
return ((s->ctype+1)[(unsigned char)c] & (_MY_U | _MY_L));
704
inline static bool my_isupper(const charset_info_st *s, char c)
706
return ((s->ctype+1)[(unsigned char)c] & _MY_U);
709
inline static bool my_islower(const charset_info_st *s, char c)
711
return ((s->ctype+1)[(unsigned char)c] & _MY_L);
714
inline static bool my_isdigit(const charset_info_st *s, char c)
716
return ((s->ctype+1)[(unsigned char)c] & _MY_NMR);
719
inline static bool my_isxdigit(const charset_info_st *s, char c)
721
return ((s->ctype+1)[(unsigned char)c] & _MY_X);
724
inline static bool my_isalnum(const charset_info_st *s, char c)
726
return ((s->ctype+1)[(unsigned char)c] & (_MY_U | _MY_L | _MY_NMR));
729
inline static bool my_isspace(const charset_info_st *s, char c)
731
return ((s->ctype+1)[(unsigned char)c] & _MY_SPC);
734
inline static bool my_ispunct(const charset_info_st *s, char c)
736
return ((s->ctype+1)[(unsigned char)c] & _MY_PNT);
739
inline static bool my_isprint(const charset_info_st *s, char c)
741
return ((s->ctype+1)[(unsigned char)c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B));
744
inline static bool my_isgraph(const charset_info_st *s, char c)
746
return ((s->ctype+1)[(unsigned char)c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR));
749
inline static bool my_iscntrl(const charset_info_st *s, char c)
751
return ((s->ctype+1)[(unsigned char)c] & _MY_CTR);
689
inline static char my_toupper(const charset_info_st *s, unsigned char c)
691
return s->to_upper[c];
694
inline static char my_tolower(const charset_info_st *s, unsigned char c)
696
return s->to_lower[c];
699
inline static bool my_isalpha(const charset_info_st *s, unsigned char c)
701
return (s->ctype+1)[c] & (_MY_U | _MY_L);
704
inline static bool my_isupper(const charset_info_st *s, unsigned char c)
706
return (s->ctype+1)[c] & _MY_U;
709
inline static bool my_islower(const charset_info_st *s, unsigned char c)
711
return (s->ctype+1)[c] & _MY_L;
714
inline static bool my_isdigit(const charset_info_st *s, unsigned char c)
716
return (s->ctype+1)[c] & _MY_NMR;
719
inline static bool my_isxdigit(const charset_info_st *s, unsigned char c)
721
return (s->ctype+1)[c] & _MY_X;
724
inline static bool my_isalnum(const charset_info_st *s, unsigned char c)
726
return (s->ctype+1)[c] & (_MY_U | _MY_L | _MY_NMR);
729
inline static bool my_isspace(const charset_info_st *s, unsigned char c)
731
return (s->ctype+1)[c] & _MY_SPC;
734
inline static bool my_ispunct(const charset_info_st *s, unsigned char c)
736
return (s->ctype+1)[c] & _MY_PNT;
739
inline static bool my_isprint(const charset_info_st *s, unsigned char c)
741
return (s->ctype+1)[c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B);
744
inline static bool my_isgraph(const charset_info_st *s, unsigned char c)
746
return (s->ctype+1)[c] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR);
749
inline static bool my_iscntrl(const charset_info_st *s, unsigned char c)
751
return (s->ctype+1)[c] & _MY_CTR;
754
754
/* Some macros that should be cleaned up a little */
755
755
inline static bool my_isvar(const charset_info_st *s, char c)
757
return (my_isalnum(s,c) || (c) == '_');
757
return my_isalnum(s,c) || (c) == '_';
760
760
inline static bool my_isvar_start(const charset_info_st *s, char c)
762
return (my_isalpha(s,c) || (c) == '_');
762
return my_isalpha(s,c) || (c) == '_';
765
765
inline static bool my_binary_compare(const charset_info_st *s)
767
return (s->state & MY_CS_BINSORT);
767
return s->state & MY_CS_BINSORT;
770
770
inline static bool use_strnxfrm(const charset_info_st *s)
772
return (s->state & MY_CS_STRNXFRM);
772
return s->state & MY_CS_STRNXFRM;
775
775
inline static size_t my_strnxfrm(const charset_info_st *cs,
821
821
inline static size_t my_charpos(const charset_info_st *cs,
822
822
const CHAR_T *b, const CHAR_T* e, size_t num)
824
return (cs->cset->charpos(cs, (const char*) b, (const char *)e, num));
824
return cs->cset->charpos(cs, reinterpret_cast<const char*>(b), reinterpret_cast<const char*>(e), num);
827
827
inline static bool use_mb(const charset_info_st *cs)
829
return (cs->cset->ismbchar != NULL);
829
return cs->cset->ismbchar != NULL;
832
832
inline static unsigned int my_ismbchar(const charset_info_st *cs, const char *a, const char *b)
834
return (cs->cset->ismbchar(cs, a, b));
834
return cs->cset->ismbchar(cs, a, b);
837
837
inline static unsigned int my_mbcharlen(const charset_info_st *cs, uint32_t c)
839
return (cs->cset->mbcharlen(cs, c));
839
return cs->cset->mbcharlen(cs, c);
843
843
inline static size_t my_caseup_str(const charset_info_st *cs, char *src)
845
return (cs->cset->caseup_str(cs, src));
845
return cs->cset->caseup_str(cs, src);
848
848
inline static size_t my_casedn_str(const charset_info_st *cs, char *src)
850
return (cs->cset->casedn_str(cs, src));
850
return cs->cset->casedn_str(cs, src);
853
853
inline static long my_strntol(const charset_info_st *cs,