Loading sql/sql_string.cc +0 −34 Original line number Diff line number Diff line Loading @@ -569,40 +569,6 @@ int String::strstr(const String &s,uint32 offset) return -1; } /* Search after a string without regarding to case This needs to be replaced when we have character sets per string */ int String::strstr_case(const String &s,uint32 offset) { if (s.length()+offset <= str_length) { if (!s.length()) return ((int) offset); // Empty string is always found register const char *str = Ptr+offset; register const char *search=s.ptr(); const char *end=Ptr+str_length-s.length()+1; const char *search_end=s.ptr()+s.length(); skip: while (str != end) { if (str_charset->sort_order[*str++] == str_charset->sort_order[*search]) { register char *i,*j; i=(char*) str; j=(char*) search+1; while (j != search_end) if (str_charset->sort_order[*i++] != str_charset->sort_order[*j++]) goto skip; return (int) (str-Ptr) -1; } } } return -1; } /* ** Search string from end. Offset is offset to the end of string */ Loading sql/sql_string.h +0 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,6 @@ class String bool append_with_prefill(const char *s, uint32 arg_length, uint32 full_length, char fill_char); int strstr(const String &search,uint32 offset=0); // Returns offset to substring or -1 int strstr_case(const String &s,uint32 offset=0); int strrstr(const String &search,uint32 offset=0); // Returns offset to substring or -1 bool replace(uint32 offset,uint32 arg_length,const char *to,uint32 length); bool replace(uint32 offset,uint32 arg_length,const String &to); Loading Loading
sql/sql_string.cc +0 −34 Original line number Diff line number Diff line Loading @@ -569,40 +569,6 @@ int String::strstr(const String &s,uint32 offset) return -1; } /* Search after a string without regarding to case This needs to be replaced when we have character sets per string */ int String::strstr_case(const String &s,uint32 offset) { if (s.length()+offset <= str_length) { if (!s.length()) return ((int) offset); // Empty string is always found register const char *str = Ptr+offset; register const char *search=s.ptr(); const char *end=Ptr+str_length-s.length()+1; const char *search_end=s.ptr()+s.length(); skip: while (str != end) { if (str_charset->sort_order[*str++] == str_charset->sort_order[*search]) { register char *i,*j; i=(char*) str; j=(char*) search+1; while (j != search_end) if (str_charset->sort_order[*i++] != str_charset->sort_order[*j++]) goto skip; return (int) (str-Ptr) -1; } } } return -1; } /* ** Search string from end. Offset is offset to the end of string */ Loading
sql/sql_string.h +0 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,6 @@ class String bool append_with_prefill(const char *s, uint32 arg_length, uint32 full_length, char fill_char); int strstr(const String &search,uint32 offset=0); // Returns offset to substring or -1 int strstr_case(const String &s,uint32 offset=0); int strrstr(const String &search,uint32 offset=0); // Returns offset to substring or -1 bool replace(uint32 offset,uint32 arg_length,const char *to,uint32 length); bool replace(uint32 offset,uint32 arg_length,const String &to); Loading