Hey,
How can i get a char length?
im using char str [ ] = "blabla"; // i dont want to use String !
how can i get the length?
Hey,
How can i get a char length?
im using char str [ ] = "blabla"; // i dont want to use String !
how can i get the length?
strlen
strlen Where?
can you show it on my code?
int len = strlen(str);
im using char str [ ] = "blabla"; // i dont want to use String !
If your strings are constants, you might also want to consider using "sizeof(str) - 1" (the -1 accounts for the terminating null that C puts at the end of strings.)