char array length

SOLVED:
used strLen(cmd)

OK...
This should be simple.
What am I missing?

 void setup() {
   Serial.begin(9600); 
   while (!Serial);  

   transmit("getUid");                     
 }

 void loop(){} // Empty, but necessary

 void transmit(char cmd[]){

    // check if data arrives ok    
      Serial.print(":");  Serial.print(cmd);  Serial.println(":");  // :getUid: input OK.

    // get the arrays size
      byte size_1= sizeof(cmd);  
      Serial.print("size_1 :");Serial.print(size_1);Serial.println(":");  // :2:
    
      byte size_2= sizeof(cmd)/sizeof(cmd[0]);  
      Serial.print("size_2 :");Serial.print(size_2);Serial.println(":");  // :2:

      byte size_3= sizeof(cmd)/sizeof(byte);  
      Serial.print("size_3 :");Serial.print(size_3);Serial.println(":");  // :2:

  }

sizeof(cmd);will always return a value of 2 as what you passed to the transmit() function is a pointer to the char array not the char array itself.

using a * gives the same result.

void transmit(char *cmd){...}

so how, than, do I get the lenght?

so how, than, do I get the lenght?

Calculate it and pass it to the function

What do you want to do with the length in the function ?