22.02.2014, 12:39
try this
here's an example of using it:
test it here
it will output
like this, all the charsof a string will be turned into lowercase chars, IF they were uppercase chars.
pawn Код:
stock low(s[])
{
for(new i=0; s[i] != EOS; i++)
s[i] = ((s[i] > 31) && (s[i] < 59)) ? (s[i]) : (tolower(s[i]));
}
pawn Код:
new mystring[] = "CAPslockKK!!";
printf("before: %s",mystring);
low(mystring);
printf("after: %s",mystring);
stock low(s[])
{
for(new i=0; s[i] != EOS; i++)
s[i] = ((s[i] > 31) && (s[i] < 59)) ? (s[i]) : (tolower(s[i]));
}
it will output
Код:
before: CAPSlockKKK!! after: capslockkkk!!