Name

wcslwr - converts the wide-character string to lower-case wide-character string.

Library

libc.lib

Synopsis

  #include <wchar.h>
  wchar_t* wcslwr (wchar_t *wcs);

Detailed description

The wcslwr() function converts each letter from the wide-character string wcs to lower-case. The conversion is determined by the LC_CTYPE category setting of the locale. Other characters are not affected. It returns a pointer to the altered string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument.

Return values

The wcslwr() returns a pointer to the altered string, on successful conversion of wcs, else it returns NULL pointer.

Examples

#include <wchar.h>
/* Illustrates how to use wcslwr API */
int example_wcslwr(void)
{ 
  /* input string which needs to be converted to lower-case */
  wchar_t src[9]=L"TESTCASE";
 
  /* expected result string */
  wchar_t *exp=L"testcase";
 
  wchar_t *res = NULL;
    
  /* function call to convert the src to lower-case */
  res = wcslwr(src);
  /* compare res string with exp string, if they are equal then return 0, else return -1 */
  if( res != NULL && !wcscmp(res,exp))
        return 0;
  else
        return -1;
}

         


See also

strupr, strlwr, towupper, towlower, wcsupr

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top