How to copy wide character buffer in C

1 Answer

0 votes
#include <stdio.h>
#include <wchar.h>

// wchar_t* wmemmove (wchar_t* destination, const wchar_t* source, size_t num);

// Move block of wide characters 
// Copies the values of num elements of type wchar_t from the source to the destination

void main()
{
	wchar_t string[] = L"Learn c programming";

	printf("%ls\n", string);

	wmemmove(string + 4, string, 2);

	printf("%ls\n", string);
}



/*
run:

Learn c programming
LearLec programming

*/

 



answered Aug 7, 2024 by avibootz

Related questions

1 answer 145 views
1 answer 114 views
114 views asked Aug 7, 2024 by avibootz
1 answer 145 views
145 views asked Jun 22, 2017 by avibootz
1 answer 145 views
1 answer 100 views
100 views asked Aug 7, 2024 by avibootz
...