I'm using sizeof and strlen. With the char* strings I get back the right number from strlen, but it always kicks back "2" from sizeof.
Doing the same with a string - that doesn't use char* - I get the right numbers back (from sizeof and strlen).
char *testStrings[5] = {"abcd", "abcde", "abcdef", "abcdefg", "abcdefgh"};
int numero;
const char fixedstr[] = "tenletters";
void setup()
{
Serial.begin(19200);
Serial.print("ok\r\n\");
}
void loop()
{
Serial.print("strlen tS_[0] = ");
numero = strlen(testStrings[0]);
Serial.println(numero);
Serial.print("sizeof tS[0] = ");
numero = sizeof(testStrings[0]);
Serial.println(numero);
Serial.print("strlen tS[4] = ");
numero = strlen(testStrings[4]);
Serial.println(numero);
Serial.print("sizeof tS[4] = ");
numero = sizeof(testStrings[4]);
Serial.println(numero);
Serial.print("strlen FC = ");
numero = strlen(fixedstr);
Serial.println(numero);
Serial.print("sizeof FC = ");
numero = sizeof(fixedstr);
Serial.println(numero);
delay(2000);
Serial.print("\r\n\r\n");
}