SA-MP Forums Archive
Quick 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: Quick question (/showthread.php?tid=617679)



Quick question - boy - 25.09.2016

Is it possible to capitalize a certain word without like typing it in capitals?

For example,

My string is 'Johnny'. I want it all to be in capital letters, without having to manually type it.


Re: Quick question - Jefff - 25.09.2016

Yes use loop with strlen then toupper

pawn Код:
for(new i = strlen(string)-1; i > -1; i--)
    string[i] = toupper(string[i]);

// now 'string' is JOHNNY