[UCRT] Import Microsoft.Windows.SDK.CRTSource version 10.0.22621.3

Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3
License: MIT
This commit is contained in:
Timo Kreuzer 2024-05-11 07:03:12 +02:00
parent f1b60c66f0
commit 04e0dc4a7a
568 changed files with 115483 additions and 0 deletions

View file

@ -0,0 +1,30 @@
//
// wcsrev.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Defines _wcsrev(), which reverses a wide chraacter string in place. The
// pointer to the string is returned.
//
#include <string.h>
extern "C" wchar_t* __cdecl _wcsrev(wchar_t* const string)
{
// Find the end of the string:
wchar_t* right = string;
while (*right++) { }
right -= 2;
// Reverse the strong:
wchar_t* left = string;
while (left < right)
{
wchar_t const c = *left;
*left++ = *right;
*right-- = c;
}
return string;
}