 | C251 User's Guide |  |
|
|
| strlen| Summary | | | Description | The strlen function calculates the length, in bytes, of src. This calculation does not include the null terminating character. | | Return Value | The strlen function returns the length of src. | | See Also | strcat, strncat, strncpy | | Example |
#include <string.h>
#include <stdio.h> /* for printf */
void tst_strlen (void) {
char buf [] = "Find the length of this string";
int len;
len = strlen (buf);
printf ("string length is %d\n", len);
}
|
|
|