Uppercase.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Uppercase.. (
/showthread.php?tid=623768)
Uppercase.. -
teamz - 05.12.2016
Does anyone know a method to pass a character string to uppercase?




Re: Uppercase.. -
GoldenLion - 05.12.2016
https://sampwiki.blast.hk/wiki/Toupper
Re: Uppercase.. -
Dayrion - 05.12.2016
Hi.
This should work:
PHP код:
LowerToUpper(string[])
{
for(new i, j = strlen(string); i < j; i++)
{
if(string[i] < 97 || string[i] > 122)
continue;
string[i] -= 32;
}
return string;
}
Re: Uppercase.. -
TheRohlikar - 05.12.2016
Quote:
Originally Posted by Dayrion
Hi.
This should work:
PHP код:
LowerToUpper(string[])
{
for(new i, j = strlen(string); i < j; i++)
{
if(string[i] < 97 || string[i] > 122)
continue;
string[i] -= 32;
}
return string;
}
|
Mm, sorry, but. I do not really see anything with getting that string to upper case.