mirror of
https://github.com/reactos/reactos.git
synced 2025-05-21 01:54:21 +00:00

Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3 License: MIT
34 lines
840 B
C++
34 lines
840 B
C++
//
|
|
// wcstok.cpp
|
|
//
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//
|
|
// Defines wcstok(), which tokenizes a string via repeated calls. See strtok()
|
|
// for more details.
|
|
//
|
|
#include <corecrt_internal.h>
|
|
#include <string.h>
|
|
|
|
|
|
|
|
_Check_return_
|
|
extern "C" wchar_t* __cdecl __acrt_wcstok_s_novalidation(
|
|
_Inout_opt_z_ wchar_t* string,
|
|
_In_z_ wchar_t const* control,
|
|
_Inout_ _Deref_prepost_opt_z_ wchar_t** context
|
|
);
|
|
|
|
|
|
|
|
extern "C" wchar_t* __cdecl wcstok(
|
|
wchar_t* const string,
|
|
wchar_t const* const control,
|
|
wchar_t** const context
|
|
)
|
|
{
|
|
wchar_t** const context_to_use = context != nullptr
|
|
? context
|
|
: &__acrt_getptd()->_wcstok_token;
|
|
|
|
return __acrt_wcstok_s_novalidation(string, control, context_to_use);
|
|
}
|