Question - 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: Question (
/showthread.php?tid=616441)
Question -
ZachKnoxx - 04.09.2016
Does anyone know if it is possible to convert a string or message into all capital letters? And before you ask, for what I'm trying to do, I cannot turn on capslock and manually type it all out.
Re: Question -
Shinja - 04.09.2016
PHP код:
toupper(letter);
EDIT: to capitalize whole string
PHP код:
Capital(string)
{
for(new i, len = strlen(string); i < len; i++)
{
string[i] = toupper(string[i]);
}
return string;
}
Re: Question -
ZachKnoxx - 04.09.2016
Quote:
Originally Posted by Shinja
PHP код:
toupper(letter);
EDIT: to capitalize whole string
PHP код:
Capital(string)
{
for(new i, len = strlen(string); i < len; i++)
{
string[i] = toupper(string[i]);
}
return string;
}
|
Thank you very much.