| |||
| Home > RealView Debugger Predefined Macros > Alphabetical predefined macro reference > strlen | |||
Returns the length or the specified string.
unsigned long strlen (str1) char *str1;
where:
str1Variable of type pointer to char. Specifies the location in memory of the first byte of a character string.
This macro returns the string length. The strlen macro
counts the number of characters in a string up to but not including
the NUL terminating character.
This macro behaves like the strlen function
in the ANSI C string library.
unsigned
longReturn value is equal to the
number of characters in the string pointed to by str1, not
including the terminating NUL character.
Strings are assumed to be NUL terminated.
If str1 is not properly terminated
by a NUL character, the length returned is invalid.
This example shows how to use strlen on
the command line:
> ce strlen("1234567890")
Result is: 10 0x0000000A