11.11.2010, 13:17
I guess you could do a loop to go through each character in the string and check if it's numeric, and if it is, censor it. For example:
Edit: Someone beat me to it
pawn Код:
new string[] = "Hello world 127.0.0.1";
new count = 0;
for(new i = 0; i < sizeof(string); i++)
{
if (((string[i] <= '9' && string[i] >= '0') || !(i==0 && (string[i]=='-' || string[i]=='+')))) // Taken from IsNumeric by DracoBlue
{
count++;
if(count > 3) string[i] = '*';
}
}