![]() |
![]() |
![]() |
C++ Reference: strlen()
strlen()
Declaration
size_t strlen(const char* kcpString);
Description
This function returns the length of the null-terminated string "kcpString."
Example
#include <cstdio>
#include <cstring>
int main()
{
char caString[] = "XoaX.net";
// Get the length of the string
int iLength = strlen(caString);
printf("The length of %s is %i\n", caString, iLength);
return 0;
}
Output:
![]() |
![]() |
![]() |
| Home | | | Reference | | | Play Games! | | | Blog | | | Forum | | | Site Map | | | Contact Us |





