Syntax
#include <wchar.h> size_t wcslen(const wchar_t *string);Description
wcslen computes the number of wide characters in the string pointed to by string.
wcslen returns the number of wide characters in string, excluding the terminating wchar_t null character.
This example computes the length of the wide-character string string.
#include <stdio.h>
#include <wchar.h>
int main(void)
{
   wchar_t *string = L"abcdef";
   printf("Length of \"%ls\" is %i\n", string, wcslen(string));
   return 0;
   /****************************************************************************
      The output should be:
      Length of "abcdef" is 6
   ****************************************************************************/
}
Related Information