String.ToLower() & String.ToUpper()

Moderator: GZDoom Developers

Post Reply
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

String.ToLower() & String.ToUpper()

Post by Accensus »

Couldn't find traces of that in the ZScript source. An example of where it could be useful:

Code: Select all

string Tag = ToLower(GetWeaponTag());
if (Tag.IndexOf("someword") != -1) { ... } 
That's because IndexOf() isn't case insensitive. Workarounds would probably require a truckload of checks.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: String.ToLower() & String.ToUpper()

Post by _mental_ »

Added in 33beca6.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: String.ToLower() & String.ToUpper()

Post by Accensus »

Thanks, _mental_!
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”