PDA

View Full Version : Problam in the IsEnglish


tal_peretz
17/03/2012, 07:36 PM
I made stock that checked if the string is in english .. and it's not work -

stock IsEnglish(TMP[])
{

for(new h = 0; h < strlen(TMP); h++)
{
if(TMP[h] > 'a' && TMP[h] < 'Z') return 1;
else return 0;
}

return 1;
}

what not good here?

Thanks :)

mineralo
17/03/2012, 08:22 PM
try this
stock IsEnglish(TMP[])
{

for(new h = 0; h < strlen(TMP); h++)
{
if(TMP[h] > 'a' && TMP[h] < 'Z')
{
return 1;
}
else return 0;
}

return 1;
}
or
stock IsEnglish(TMP[])
{
for(new h = 0; h < strlen(TMP); h++)
{
if(TMP[h] > 'a' && TMP[h] < 'Z') return 1;
}
return 0;
}

tal_peretz
18/03/2012, 10:14 AM
not good ..

help ? it's always thing that is in english !

Shabi RoxX
18/03/2012, 10:19 AM
May be create array of alphabets like a,b,c...z and check if its in array ???

Tigerkiller
18/03/2012, 10:28 AM
or use my language include

tal_peretz
18/03/2012, 10:40 AM
or use my language include
the download for the includ not work for me man ..

tal_peretz
18/03/2012, 04:42 PM
jump