ReactOS 0.4.16-dev-889-g9563c07
strtok.cpp
Go to the documentation of this file.
1//
2// strtok.cpp
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// Defines strtok(), which tokenizes a string via repeated calls.
7//
8// strtok() considers the string to consist of a sequence of zero or more text
9// tokens separated by spans of one or more control characters. The first call,
10// with a string specified, returns a pointer to the first character of the
11// first token, and will write a null character into the string immediately
12// following the returned token. Subsequent calls with a null string argument
13// will work through the string until no tokens remain. The control string
14// may be different from call to call. When no tokens remain in the string, a
15// null pointer is returned.
16//
17#include <corecrt_internal.h>
18#include <string.h>
19
20
21
23 _Inout_opt_z_ char* string,
24 _In_z_ char const* control,
26 );
27
28
29
30extern "C" char* __cdecl strtok(char* const string, char const* const control)
31{
32 return __acrt_strtok_s_novalidation(string, control, &__acrt_getptd()->_strtok_token);
33}
#define __cdecl
Definition: accygwin.h:79
__acrt_ptd *__cdecl __acrt_getptd(void)
#define _Deref_prepost_opt_z_
Definition: ms_sal.h:1424
#define _Inout_
Definition: no_sal2.h:162
#define _In_z_
Definition: no_sal2.h:164
#define _Inout_opt_z_
Definition: no_sal2.h:220
char *__cdecl __acrt_strtok_s_novalidation(_Inout_opt_z_ char *string, _In_z_ char const *control, _Inout_ _Deref_prepost_opt_z_ char **context)
Definition: strtok_s.cpp:16
char *__cdecl strtok(char *const string, char const *const control)
Definition: strtok.cpp:30
Definition: http.c:7252
Definition: dialog.c:52