Reading several commands from 1 SMS

Hello.
With the consent of the original author, I modify the program code for my own use (task for school).

I would like to be able to change the status of several LEDs with one SMS. Currently, I need to send separate messages for each diode.
I think commands could be separated by a semicolon ";".
Unfortunately, I do not know how to go about it.

I attach the a piece of code responsible for reading commands from SMS below. Greetings

        case NEXT_TXT:
          for(int i=0;i<num;i++){
            if(buffer[i]=='\r'||buffer[i]=='\n')buffer[i]=0;
          }
          Serial.print("Wiadomosc: ");
          Serial.println(buffer);
     
          if(nr_correct){
            if(strcmp(buffer,"WL 10")==0){
              digitalWrite(10,HIGH);
            }
            if(strcmp(buffer,"WYL 10")==0){
              digitalWrite(10,LOW);
            }
            if(strcmp(buffer,"WL 7")==0){
              digitalWrite(7,HIGH);
            }
            if(strcmp(buffer,"WYL 7")==0){
              digitalWrite(7,LOW);
            }
            if(strcmp(buffer,"STATUS")==0){
              send_resp=1;//Raport
            }
          }

Send the commands in a string delimited how ever you want (semicolons are fine. Commas are more commonly used). Then use the strtok() function to parse the string and recover your data. See the example #5 of the serial input basics tutorial for an example of parsing a string with strtok().

groundFungus:
Send the commands in a string delimited how ever you want (semicolons are fine. Commas are more commonly used). Then use the strtok() function to parse the string and recover your data. See the example #5 of the serial input basics tutorial for an example of parsing a string with strtok().

Hi. I solved it a little differently.
I used the strstr function instead of the strcmp.
Thanks to that the commands in the message can be in one sequence - the program searches for keywords anyway.
The only thing that matters is the order of commands - Arduino performs one after the other.