Anti Caps Lock not working
#3

Your loop stops on the first encountered caps character. That isnt correct, as it should loop through all of them.
Код:
stock IsCaps( text[ ] )
{
	for( new i = 0, j = strlen( text ); i < j; i ++ )
	{
		if( ! ( 'A' <= text[ i ] <= 'Z' ))
			return false;
	}
	return true;
}
The function now returns false on the first non-caps character it returns. Also, the last character is no longer skipped
Reply


Messages In This Thread
~fixed~ - by Blackazur - 24.05.2015, 23:07
Re: Anti Caps Lock not working - by 7Ahmad7 - 24.05.2015, 23:16
Re: Anti Caps Lock not working - by Macluawn - 24.05.2015, 23:25

Forum Jump:


Users browsing this thread: