Convert to lowercase? - 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: Convert to lowercase? (
/showthread.php?tid=459093)
Convert to lowercase? -
Rokzlive - 20.08.2013
How to i convert something like AA9909EO to aa9909eo automatically in pwn? Basically turn uppercase letters in a string to lowercase.
Re: Convert to lowercase? -
HyDrAtIc - 20.08.2013
Not possible, you could just re-write it, or by using replace function.
Re: Convert to lowercase? -
Vince - 20.08.2013
Loop through entire string with tolower(). Though if you're talking color codes then that won't be necessary.
Re: Convert to lowercase? -
Aliassassin123456 - 21.08.2013
Example code:
pawn Код:
new Test[64] = "AA9909EO";
public OnPlayerConnect(playerid)
{
for(new i;i<strlen(Test);i++)
{
Test[i] = tolower(Test[i]);
}
SendClientMessage(playerid,-1,Test); // send you a message (aa9909eo)
return 1;
}