Problem with new line on mysql
#4

Use replaceChar since they're both just characters from the ASCII table:
pawn Код:
stock replaceChar(strSrc[], chWhat, chWith)
{
    for(new i; strSrc[i] != EOS; ++i)
    {
        if(strSrc[i] == chWhat)
        {
            strSrc[i] = chWith;
        }
    }
}
pawn Код:
replaceChar(string, '\n', '~');
EDIT: Works fine for me with very long strings
Reply


Messages In This Thread
Problem with new line on mysql - by wups - 16.07.2011, 16:08
Re: Problem with new line on mysql - by RyDeR` - 16.07.2011, 18:00
Re: Problem with new line on mysql - by wups - 16.07.2011, 18:02
Re: Problem with new line on mysql - by RyDeR` - 16.07.2011, 18:06
Re: Problem with new line on mysql - by wups - 16.07.2011, 18:20

Forum Jump:


Users browsing this thread: 1 Guest(s)