• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How can I check if string is case sensitive?

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
JASS:
if currPlayer == "RugarusVF" " then
   set players[i].name = "[RG]"+GetPlayerName(Player(i))
endif


Right now this will only change his name if his name is exactly RugarusVF and not if the name was for example 'rUgaRusVF'

How can I have it just match the characters and not be case restricted sort of speak?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
One would also want to define a convention for listing user account names in your map that is either all upper case or all lower case. This means you would only need to convert the player name case and not the case of any constants your script uses.

I personally go with all lower case. Feels more modern and less shouty than all upper case.
 
Status
Not open for further replies.
Top