Reactos
at master 38 lines 899 B view raw
1// 2// wcscat.cpp 3// 4// Copyright (c) Microsoft Corporation. All rights reserved. 5// 6// Defines wcscat(), which concatenates (appends) a copy of the source string to 7// the end of the destination string. 8// 9// This function assumes that the destination buffer is sufficiently large to 10// store the appended string. 11// 12#include <string.h> 13 14 15 16#if defined _M_X64 || defined _M_IX86 || defined _M_ARM || defined _M_ARM64 17 #pragma warning(disable:4163) 18 #pragma function(wcscat) 19#endif 20 21 22 23extern "C" wchar_t * __cdecl wcscat( 24 wchar_t* const destination, 25 wchar_t const* source 26 ) 27{ 28 wchar_t* destination_it = destination; 29 30 // Find the end of the destination string: 31 while (*destination_it) 32 ++destination_it; 33 34 // Append the source string to the destination string: 35 while ((*destination_it++ = *source++) != L'\0') { } 36 37 return destination; 38}