checkString function causing issues

Hi all. I am trying to read a string from a http request. It was working fine until I went to add more functions - one of those strings is called 'mode10' however, this string gets picked up when i check for a string called 'mode1'. I tried with other numbers and nothing >10 will work.

What is going on here? I thought it would check for the exact string including all characters but I guess as soon as it has a match it accepts it?

I can of course post the whole code if necessary but its rather long and badly structured at the moment

void checkString(){
  if(readString.indexOf("?mode1") >0)
  {
    if (debug == true)
      Serial.println("mode1");
    //starsTrue = false;
    mode = 1;
    mode1();

The simple answer is probably that "?mode1" is found in both "?mode1" and "?mode10".