mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
[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:
parent
f1b60c66f0
commit
04e0dc4a7a
568 changed files with 115483 additions and 0 deletions
38
sdk/lib/ucrt/string/wcscat.cpp
Normal file
38
sdk/lib/ucrt/string/wcscat.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
//
|
||||
// wcscat.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Defines wcscat(), which concatenates (appends) a copy of the source string to
|
||||
// the end of the destination string.
|
||||
//
|
||||
// This function assumes that the destination buffer is sufficiently large to
|
||||
// store the appended string.
|
||||
//
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
#if defined _M_X64 || defined _M_IX86 || defined _M_ARM || defined _M_ARM64
|
||||
#pragma warning(disable:4163)
|
||||
#pragma function(wcscat)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
extern "C" wchar_t * __cdecl wcscat(
|
||||
wchar_t* const destination,
|
||||
wchar_t const* source
|
||||
)
|
||||
{
|
||||
wchar_t* destination_it = destination;
|
||||
|
||||
// Find the end of the destination string:
|
||||
while (*destination_it)
|
||||
++destination_it;
|
||||
|
||||
// Append the source string to the destination string:
|
||||
while ((*destination_it++ = *source++) != L'\0') { }
|
||||
|
||||
return destination;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue