check length of string arrat arduino code example
Example: string length arduino
String myString = "text"; //make a stirng
int stringLength = myString.length(); //get length from string
//Ocelot's answer to this has a wrong "lenght" spelling