#ifndef GAME_SERVER_SQL_STRING_HELPERS_H
#define GAME_SERVER_SQL_STRING_HELPERS_H
#include
void 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 ClearString(char *pString, int size = 32)
{
char *newString = (char *)malloc(size * 2 - 1);
int pos = 0;
for(int i=0;i