• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Question about condition of strings

Status
Not open for further replies.

EdgeOfChaos

E

EdgeOfChaos

There is no default way to do so.

here is some code to do what chaosy said
just call it with custom script
JASS:
    function stringContainsChar takes string full, string charToCheck returns boolean
        local integer i = 0
        loop
            exitwhen i >= StringLength(full)
            if(SubString(full, i, i+1) == charToCheck)then
                return true
            endif
            set i = i + 1
        endloop
        return false
    endfunction
 
Status
Not open for further replies.
Top