Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-201
strlen
strlen
The strlen function computes the length of a string.
str_ptr
points to the string to measure.
Return Value
is the number of characters in *str_ptr, except for the terminating null character.
Example
This example measures string s and prints its length:
#include <stringh>
#include <stdioh>
int main(void)
{
char *s;
s = "Go Tandem";
printf("%d",strlen(s)); /* "9" */
}
#include <stringh>
size_t strlen(const char *str_ptr);