C examples for wchar.h:wcsstr
function
<cwchar> <wchar.h>
Locate substring of wide string
const wchar_t* wcsstr (const wchar_t* wcs1, const wchar_t* wcs2); wchar_t* wcsstr ( wchar_t* wcs1, const wchar_t* wcs2);
Parameter | Description |
---|---|
wcs1 | C wide string to be scanned. |
wcs2 | C wide string of characters to match. |
A pointer to the first found character in wcs1, or a null pointer if the sequence is not present in wcs1.
#include <wchar.h> int main ()//from www. j a v a2 s . c o m { wchar_t wcs[] = L"This is a simple string"; wchar_t * pwc; pwc = wcsstr (wcs,L"simple"); wcsncpy (pwc,L"sample",6); wprintf (L"%ls\n",wcs); return 0; }