why use indexof for sim800l?

Hi Guys, i have one question
why we use indexof for state of relay? what is indexof?

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10,11);  // (Rx,Tx  > Tx,Rx) 

char incomingByte; 
String inputString;
int relay = 13; // Output for Relay Control

void setup() 
{
      pinMode(relay, OUTPUT);
      digitalWrite(relay, LOW); // Initial state of the relay
      Serial.begin(9600);
      mySerial.begin(9600); 

     while(!mySerial.available()){
        mySerial.println("AT");
        delay(1000); 
        Serial.println("Connecting...");
        }
      Serial.println("Connected!");  
      mySerial.println("AT+CMGF=1");  //تغیر SMS به حالت متنی 
      delay(1000);  
      mySerial.println("AT+CNMI=1,2,0,0,0"); 
      delay(1000);
      mySerial.println("AT+CMGL=\"REC UNREAD\""); // دستوری برای خواندن پیام ها
     }

void loop()
{  
  if(mySerial.available()){
      delay(100);

      // Serial Buffer
      while(mySerial.available()){
        incomingByte = mySerial.read();
        inputString += incomingByte; 
        }

        delay(10);      

        Serial.println(inputString);
        inputString.toUpperCase(); // Uppercase the Received Message

        //turn RELAY ON or OFF
        if (inputString.indexOf("ON") > -1){
          digitalWrite(relay, HIGH);
          }
         if (inputString.indexOf("OFF") > -1){
          digitalWrite(relay, LOW);
          }          

        delay(50);

        //Delete Messages & Save Memory
        if (inputString.indexOf("OK") == -1){
        mySerial.println("AT+CMGDA=\"DEL ALL\"");

        delay(1000);}

        inputString = "";
  }
}

The indexof() function reference.

thanks a lot.
but i cant analyze these two lines of coding ? what happend in this two line for turn relay on or turn relay off

parisapbn:
thanks a lot.
but i cant analyze these two lines of coding ? what happend in this two line for turn relay on or turn relay off

did you even read post#1 ?

that index thing in your sketch means

if you send a text that has a word 'ON' in it, relay comes on eg: of text type 'bizzare on here it goes'

same applies to OFF