strlen

Navigation:  Programming language SQC > Built-in functions > Output >

strlen

Previous pageReturn to chapter overviewNext page

The strlen() function gives the length of a string, not including the NUL character at the end.

 

int strlen( char *str )

 

Example:

 

int main()

{

  char *t = "Hello World";

  printf( "Length of <%s> is %d.\n", t, strlen( t ));

 

  return 0;

}

 

Output:

 

  Length of <Hello World> is 11.