19 #include <drizzled/typelib.h>
20 #include <drizzled/charset.h>
40 uint32_t TYPELIB::find_type(
const char *find, uint32_t length,
bool part_match)
const
42 uint32_t found_count=0, found_pos=0;
43 const char* end= find + length;
46 for (uint32_t pos= 0 ; (j= type_names[pos++]); )
48 for (i= find ; i != end && system_charset_info->toupper(*i) == system_charset_info->toupper(*j); i++, j++)
59 return found_count == 1 && part_match ? found_pos : 0;
80 uint32_t TYPELIB::find_type2(
const char *x, uint32_t length,
const charset_info_st *cs)
const
85 for (
int pos=0 ; (j= type_names[pos]) ; pos++)
87 if (!my_strnncoll(cs, (
const unsigned char*) x, length,
88 (
const unsigned char*) j, type_lengths[pos]))
TODO: Rename this file - func.h is stupid.