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

