Name
wcpcpy
- copy a wide character string, returning a pointer to its end
Library
libc.lib
Synopsis
|
wchar_t *
wcpcpy (wchar_t *dst , const wchar_t *src);
|
Return values
The
wcpcpy()
function returns a pointer to the end of the wide-character string
dest
, that is the return pointer points to the terminating ’\0’.
See also
Detailed description
The
wcpcpy()
function
copies the wide-character string
src
to
dst
(including the terminating
‘\0’
character.)
Examples
#include <stdlib.h>
#include <wchar.h>
/* Illustrates how to use wcpcpy API */
int example_wcpcpy()
{
/* input string for which length to be found */
wchar_t *src = L"testcase";
wchar_t *dest = NULL;
wchar_t *destEndPtr = NULL;
/* allocate memory for the destination string */
dest = (wchar_t *)malloc((wcslen(src)+1)*sizeof(wchar_t));
/* perform the operation */
if(dest != NULL)
destEndPtr = (wchar_t *)wcpcpy(dest,src);
else
return 1;
if(!wcscmp(dest,src))
{
free(dest);
return 0;
}
else
{
free(dest);
return 1;
}
}
Feedback
For additional information or queries on this page send feedback
© 2005-2007 Nokia
|
|