#include <string.h>
#include <corecrt_internal_securecrt.h>
Go to the source code of this file.
◆ __acrt_strtok_s_novalidation()
Definition at line 16 of file strtok_s.cpp.
21{
22
23
24 unsigned char map[32];
26 {
28 }
29
30
31 unsigned char const* unsigned_control =
reinterpret_cast<unsigned char const*
>(
control);
32 do
33 {
34 map[*unsigned_control >> 3] |= (1 << (*unsigned_control & 7));
35 }
36 while (*unsigned_control++);
37
38
39
40 char* it = string != nullptr
43
44 unsigned char*& unsigned_it = reinterpret_cast<unsigned char*&>(it);
45
46
47
48
49 while ((
map[*unsigned_it >> 3] & (1 << (*unsigned_it & 7))) && *it)
50 {
51 ++it;
52 }
53
54 char* const token_first = it;
55
56
57
58 for (; *it; ++it)
59 {
60 if (
map[*unsigned_it >> 3] & (1 << (*unsigned_it & 7)))
61 {
62 *it++ = '\0';
63 break;
64 }
65 }
66
67
69
70
71 return it != token_first ? token_first : nullptr;
72}
GLuint GLuint GLsizei count
Referenced by strtok(), and strtok_s().
◆ strtok_s()
Definition at line 76 of file strtok_s.cpp.
77{
81
83}
#define _VALIDATE_CONDITION_ERROR_RETURN(_Condition, _ErrorCode, _Ret)
#define _VALIDATE_POINTER_ERROR_RETURN(_Pointer, _ErrorCode, _Ret)
char *__cdecl __acrt_strtok_s_novalidation(_Inout_opt_z_ char *string, _In_z_ char const *control, _Inout_ _Deref_prepost_opt_z_ char **context)