#include #include #include #include #include "sql_string_helpers.h" void sqlstr::FuzzyString(char *pString) { char newString[32*4-1]; int pos = 0; for(int i=0;i<64;i++) { if(!pString[i]) break; newString[pos++] = pString[i]; if (pString[i] != '\\' && str_utf8_isstart(pString[i+1])) newString[pos++] = '%'; } newString[pos] = '\0'; strcpy(pString, newString); } // anti SQL injection void sqlstr::ClearString(char *pString, int size) { char *newString = new char [size * 2 - 1]; int pos = 0; for(int i=0;i