How to check if a string contains spaces?
#3

pawn Code:
new string[length];
for(new i = 0; i < strlen(string); i++)
{
    if(string[i] == ' ') string[i] = '_';
}
Will replace any space with an underscore.
Reply


Messages In This Thread
How to check if a string contains spaces? - by Superthijs - 04.02.2012, 11:03
Re: How to check if a string contains spaces? - by Universal - 04.02.2012, 11:05
Re: How to check if a string contains spaces? - by [XST]O_x - 04.02.2012, 11:05
Re: How to check if a string contains spaces? - by Superthijs - 04.02.2012, 11:09
Re: How to check if a string contains spaces? - by Superthijs - 04.02.2012, 11:12
Re: How to check if a string contains spaces? - by AndreT - 04.02.2012, 11:14
Re: How to check if a string contains spaces? - by [XST]O_x - 04.02.2012, 11:15
Re: How to check if a string contains spaces? - by Superthijs - 04.02.2012, 11:15

Forum Jump:


Users browsing this thread: 1 Guest(s)