Release GSC toUpper Function

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,198
Points
553
I was bored and was looking through some GSC functions and noticed there was a standard toLower function but no toUpper so I thought I would release one for the uh... beginners haha. It could be used for something like a subMenu with player names so it converts them to uppercase and makes the menu look a little neater, or something, idk.

Here's the code:
Code:
toUpper(text)
{
    alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    build = "";

    for(i = 0; i < text.size; i++)
        build += isSubStr(alphabet, text[i]) ? alphabet[i] : text[i];

    return build;
}
Call it like so:
Code:
self iPrintLn(toUpper("xXPuSsYSLAyEr"));
True. Nice idea! Thanks for sharing. :y:
 

Tusta

Head Member
Donator
Messages
19
Points
14
Cool but better is you save the strings at the server so can everyone use the function with the same strings! :smile:
 
Top