Name
wcsupr - converts the wide-character string to upper-case wide-character string.
Library
libc.lib
Synopsis
|
wchar_t*
wcsupr (wchar_t *wcs);
|
Detailed description
The
wcsupr()
function
converts each letter from the wide-character string
wcs
to upper-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
wcsupr()
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 wcsupr API */
int example_wcsupr(void)
{
/* input string which needs to be converted to upper-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 upper-case */
res = wcsupr(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,
towupper,
towlower,
wcslwr
Feedback
For additional information or queries on this page send feedback
© 2005-2007 Nokia
|
|