#include <string.h>
|
|
size_t
strlen (const char *s, size_t maxlen); |
#include <string.h>
#include <stdio.h>
int main()
{
char one[50];
int ret;
strcpy(one,"abcdef");
ret = strnlen(one,5);
printf("Length obtained using strnlen = %d\n",ret);
ret = strnlen(one,10);
printf("Length obtained using strnlen = %d\n",ret);
}
Output
Length obtained using strnlen = 5 Length obtained using strnlen = 6
|
© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
|