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