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 246 views
1 answer 186 views
186 views asked Aug 7, 2024 by avibootz
1 answer 212 views
212 views asked Jun 22, 2017 by avibootz
1 answer 232 views
1 answer 168 views
168 views asked Aug 7, 2024 by avibootz
...