String Array = Anything?

Hi, I need to figure out how to get any string value in for(). For instance using int/float you can do

for(var i=MINNUMBER; i<MAXNUMBER; i++){
   if(aTextFieldString=="setplayerhealth "+i){
      do stuff in here
   }
}

so can I do this with any string and get what has been inputted?
Thanks in advance for any answers! :smiley:

Your question is not clear. Are you asking how to check strings in an array with a for-loop?

public var arrayOfStrings : String[];

function Start () {
    for(var i = 0; i < arrayOfStrings.Length; i++){
        if(arrayOfStrings*=="setplayerhealth"+i){*

//TODO: do stuff here
}
}
}