Using strfind
#4

Try:

Код:
if(strfind(inputtext, ".", true) == -1)
Not sure if it's best way (as it finds for string),

But you could also use this to find a single character:
Код:
HasDot(string[])
{
	new len = strlen(string);
	for(new i = 0; i < len; i++)
	{
		if(string[i] == '.') return true;
	}
	return false;
}
then you would use this:
Код:
if(!HasDot(inputtext))
Reply


Messages In This Thread
Using strfind - by Cepillado - 09.01.2016, 00:13
Re: Using strfind - by Jefff - 09.01.2016, 00:49
Respuesta: Using strfind - by Cepillado - 09.01.2016, 01:05
Re: Using strfind - by RoboN1X - 09.01.2016, 01:10
Re: Using strfind - by SickAttack - 09.01.2016, 01:28
Re: Using strfind - by RoboN1X - 09.01.2016, 01:45
Respuesta: Using strfind - by Cepillado - 09.01.2016, 01:47

Forum Jump:


Users browsing this thread: 1 Guest(s)