Release GSC toUpper Function

The Dark Side

Former Staff Member
Messages
1,004
Reaction score
770
Points
993
ohhhhh i like this. Thank you :smile:

also it should be called like

Code:
self iPrintLn(toUpper("xXPuSsYSLAyEr"));

You missed a bracket thing lol :tonguewink:
 

The Dark Side

Former Staff Member
Messages
1,004
Reaction score
770
Points
993
upload_2017-7-29_4-9-56.png


EXPOSED
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,093
Reaction score
2,881
Points
1,103
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:
 

VerTical

CEO
Donator
Messages
0
Reaction score
-86
Points
664
Cool but better is you save the strings at the server so can everyone use the function with the same strings! :smile:
 
Top