Size of string in character array
Posted on 2006-04-28
I have a character array declared as:
Into this array I put a string which is read from a file.
I need to know if the number of characters in the variable "line" is 12.
I could do it by looping through the array and counting characters until I got to the null pointer.
But is there a better way? Is there something comparable to the LENGTH(STRING) function found in some other languages?