xref: /reactos/sdk/include/ucrt/mbstring.h (revision 04e0dc4a)
1 //
2 // mbstring.h
3 //
4 //      Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // Functions and macros for MBCS string manipulation
7 //
8 #pragma once
9 #ifndef _INC_MBSTRING // include guard for 3rd party interop
10 #define _INC_MBSTRING
11 
12 #include <corecrt.h>
13 
14 #pragma warning(push)
15 #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16 _UCRT_DISABLE_CLANG_WARNINGS
17 
18 _CRT_BEGIN_C_HEADER
19 
20 
21 
22 #ifndef _FILE_DEFINED
23     #define _FILE_DEFINED
24     typedef struct _iobuf
25     {
26         void* _Placeholder;
27     } FILE;
28 #endif
29 
30 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
31 
32     #pragma push_macro("_mbsdup")
33     #undef _mbsdup
34 
35     _Check_return_
36     _DCRTIMP unsigned char* __cdecl _mbsdup(
37         _In_z_ unsigned char const* _Str
38         );
39 
40     #pragma pop_macro("_mbsdup")
41 
42 
43 
44     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
45     //
46     // The Multibyte Character String Library Functions
47     //
48     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
49     _Check_return_
50     _DCRTIMP unsigned int __cdecl _mbbtombc(
51         _In_ unsigned int _C
52         );
53 
54     _Check_return_
55     _DCRTIMP unsigned int __cdecl _mbbtombc_l(
56         _In_     unsigned int _C,
57         _In_opt_ _locale_t    _Locale
58         );
59 
60     _Check_return_
61     _DCRTIMP int __cdecl _mbbtype(
62         _In_ unsigned char _C,
63         _In_ int           _CType
64         );
65 
66     _Check_return_
67     _DCRTIMP int __cdecl _mbbtype_l(
68         _In_     unsigned char _C,
69         _In_     int           _CType,
70         _In_opt_ _locale_t     _Locale
71         );
72 
73     _Check_return_
74     _DCRTIMP unsigned int __cdecl _mbctombb(
75         _In_ unsigned int _C
76         );
77 
78     _Check_return_
79     _DCRTIMP unsigned int __cdecl _mbctombb_l(
80         _In_     unsigned int _C,
81         _In_opt_ _locale_t    _Locale
82         );
83 
84     _DCRTIMP int __cdecl _mbsbtype(
85         _In_reads_z_(_Pos) unsigned char const* _Str,
86         _In_               size_t               _Pos
87         );
88 
89     _DCRTIMP int __cdecl _mbsbtype_l(
90         _In_reads_z_(_Pos) unsigned char const* _Str,
91         _In_               size_t               _Pos,
92         _In_opt_           _locale_t            _Locale
93         );
94 
95     _DCRTIMP errno_t __cdecl _mbscat_s(
96         _Inout_updates_z_(_SizeInBytes) unsigned char*       _Dst,
97         _In_                            size_t               _SizeInBytes,
98         _In_z_                          unsigned char const* _Src
99         );
100 
101     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
102         errno_t, _mbscat_s,
103                unsigned char,        _Dst,
104         _In_z_ unsigned char const*, _DstSizeInBytes
105         )
106 
107     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
108         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbscat,
109         _Inout_updates_z_(_String_length_(_Dest) + _String_length_(_Source) + 1), unsigned char,        _Dest,
110         _In_z_                                                                    unsigned char const*, _Source
111         )
112 
113     _DCRTIMP errno_t __cdecl _mbscat_s_l(
114         _Inout_updates_z_(_DstSizeInBytes) unsigned char*       _Dst,
115         _In_                               size_t               _DstSizeInBytes,
116         _In_z_                             unsigned char const* _Src,
117         _In_opt_                           _locale_t            _Locale
118         );
119 
120     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
121         errno_t, _mbscat_s_l,
122                  unsigned char,        _Dest,
123         _In_z_   unsigned char const*, _Source,
124         _In_opt_ _locale_t,            _Locale
125         )
126 
127     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(
128         unsigned char* , __RETURN_POLICY_DST, _DCRTIMP, _mbscat_l, _mbscat_s_l,
129         _Inout_z_  unsigned char,
130         _Inout_z_, unsigned char,        _Dest,
131         _In_z_     unsigned char const*, _Source,
132         _In_opt_   _locale_t,            _Locale
133         )
134 
135     _Check_return_
136     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbschr(
137         _In_z_ unsigned char const* _Str,
138         _In_   unsigned int         _C
139         );
140 
141     _Check_return_
142     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbschr_l(
143         _In_z_   unsigned char const* _Str,
144         _In_     unsigned int         _C,
145         _In_opt_ _locale_t            _Locale
146         );
147 
148     _Check_return_
149     _DCRTIMP int __cdecl _mbscmp(
150         _In_z_ unsigned char const* _Str1,
151         _In_z_ unsigned char const* _Str2
152         );
153 
154     _Check_return_
155     _DCRTIMP int __cdecl _mbscmp_l(
156         _In_z_   unsigned char const* _Str1,
157         _In_z_   unsigned char const* _Str2,
158         _In_opt_ _locale_t            _Locale
159         );
160 
161     _Check_return_
162     _DCRTIMP int __cdecl _mbscoll(
163         _In_z_ unsigned char const* _Str1,
164         _In_z_ unsigned char const* _Str2
165         );
166 
167     _Check_return_
168     _DCRTIMP int __cdecl _mbscoll_l(
169         _In_z_   unsigned char const* _Str1,
170         _In_z_   unsigned char const* _Str2,
171         _In_opt_ _locale_t            _Locale
172         );
173 
174     _DCRTIMP errno_t __cdecl _mbscpy_s(
175         _Out_writes_z_(_SizeInBytes) unsigned char*       _Dst,
176         _In_                         size_t               _SizeInBytes,
177         _In_z_                       unsigned char const* _Src
178         );
179 
180     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
181         errno_t, _mbscpy_s,
182                unsigned char,        _Dest,
183         _In_z_ unsigned char const*, _Source
184         )
185 
186     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
187         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbscpy,
188         _Out_writes_z_(_String_length_(_Source) + 1), unsigned char,        _Dest,
189         _In_z_                                        unsigned char const*, _Source
190         )
191 
192     _DCRTIMP errno_t __cdecl _mbscpy_s_l(
193         _Out_writes_z_(_DstSizeInBytes) unsigned char*       _Dst,
194         _In_                            size_t               _DstSizeInBytes,
195         _In_z_                          unsigned char const* _Src,
196         _In_opt_                        _locale_t            _Locale
197         );
198 
199     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
200         errno_t, _mbscpy_s,
201                  unsigned char,        _Dest,
202         _In_z_   unsigned char const*, _Source,
203         _In_opt_ _locale_t,            _Locale
204         )
205 
206     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(
207         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbscpy_l, _mbscpy_s_l,
208         _Pre_notnull_ _Post_z_  unsigned char,
209         _Pre_notnull_ _Post_z_, unsigned char,        _Dest,
210         _In_z_                  unsigned char const*, _Source,
211         _In_opt_                _locale_t,            _Locale
212         )
213 
214     _Check_return_
215     _DCRTIMP size_t __cdecl _mbscspn(
216         _In_z_ unsigned char const* _String,
217         _In_z_ unsigned char const* _Control
218         );
219 
220     _Check_return_
221     _DCRTIMP size_t __cdecl _mbscspn_l(
222         _In_z_   unsigned char const* _String,
223         _In_z_   unsigned char const* _Control,
224         _In_opt_ _locale_t            _Locale
225         );
226 
227     _Check_return_
228     _DCRTIMP unsigned char* __cdecl _mbsdec(
229         _In_reads_z_(_Pos - _Start + 1) unsigned char const* _Start,
230         _In_z_                          unsigned char const* _Pos
231         );
232 
233     _Check_return_
234     _DCRTIMP unsigned char* __cdecl _mbsdec_l(
235         _In_reads_z_(_Pos-_Start+1) unsigned char const* _Start,
236         _In_z_                      unsigned char const* _Pos,
237         _In_opt_                    _locale_t            _Locale
238         );
239 
240     _Check_return_
241     _DCRTIMP int __cdecl _mbsicmp(
242         _In_z_ unsigned char const* _Str1,
243         _In_z_ unsigned char const* _Str2
244         );
245 
246     _Check_return_
247     _DCRTIMP int __cdecl _mbsicmp_l(
248         _In_z_   unsigned char const* _Str1,
249         _In_z_   unsigned char const* _Str2,
250         _In_opt_ _locale_t            _Locale
251         );
252 
253     _Check_return_
254     _DCRTIMP int __cdecl _mbsicoll(
255         _In_z_ unsigned char const* _Str1,
256         _In_z_ unsigned char const* _Str2
257         );
258 
259     _Check_return_
260     _DCRTIMP int __cdecl _mbsicoll_l(
261         _In_z_   unsigned char const* _Str1,
262         _In_z_   unsigned char const* _Str2,
263         _In_opt_ _locale_t            _Locale
264         );
265 
266     _Check_return_
267     _DCRTIMP unsigned char* __cdecl _mbsinc(
268         _In_z_ unsigned char const* _Ptr
269         );
270 
271     _Check_return_
272     _DCRTIMP unsigned char* __cdecl _mbsinc_l(
273         _In_z_   unsigned char const* _Ptr,
274         _In_opt_ _locale_t            _Locale
275         );
276 
277     _Check_return_
278     _Post_satisfies_(return <= _String_length_(_String))
279     _DCRTIMP size_t __cdecl _mbslen(
280         _In_z_ unsigned char const* _String
281         );
282 
283     _Check_return_
284     _Post_satisfies_(return <= _String_length_(_String))
285     _DCRTIMP size_t __cdecl _mbslen_l(
286         _In_z_   unsigned char const* _String,
287         _In_opt_ _locale_t            _Locale
288         );
289 
290     _Check_return_
291     _Post_satisfies_(return <= _String_length_(_String) && return <= _MaxCount)
292     _DCRTIMP size_t __cdecl _mbsnlen(
293         _In_z_ unsigned char const* _String,
294         _In_   size_t               _MaxCount
295         );
296 
297     _Check_return_
298     _Post_satisfies_(return <= _String_length_(_String) && return <= _MaxCount)
299     _DCRTIMP size_t __cdecl _mbsnlen_l(
300         _In_z_   unsigned char const* _String,
301         _In_     size_t               _MaxCount,
302         _In_opt_ _locale_t            _Locale
303         );
304 
305     _DCRTIMP errno_t __cdecl _mbslwr_s(
306         _Inout_updates_opt_z_(_SizeInBytes) unsigned char* _String,
307         _In_                                size_t         _SizeInBytes
308         );
309 
310     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(
311         errno_t, _mbslwr_s,
312         _Inout_updates_z_(_Size) unsigned char, _String
313         )
314 
315     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(
316         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbslwr,
317         _Inout_z_, unsigned char, _String
318         )
319 
320     _DCRTIMP errno_t __cdecl _mbslwr_s_l(
321         _Inout_updates_opt_z_(_SizeInBytes) unsigned char* _String,
322         _In_                                size_t         _SizeInBytes,
323         _In_opt_                            _locale_t      _Locale
324         );
325 
326     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
327         errno_t, _mbslwr_s_l,
328                  unsigned char, _String,
329         _In_opt_ _locale_t,     _Locale
330         )
331 
332     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(
333         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbslwr_l, _mbslwr_s_l,
334         _Inout_updates_z_(_Size) unsigned char,
335         _Inout_z_,               unsigned char, _String,
336         _In_opt_                 _locale_t,     _Locale
337         )
338 
339     _DCRTIMP errno_t __cdecl _mbsnbcat_s(
340         _Inout_updates_z_(_SizeInBytes) unsigned char*       _Dst,
341         _In_                            size_t               _SizeInBytes,
342         _In_z_                          unsigned char const* _Src,
343         _In_                            size_t               _MaxCount
344         );
345 
346     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
347         errno_t, _mbsnbcat_s,
348                unsigned char,        _Dest,
349         _In_z_ unsigned char const*, _Source,
350         _In_   size_t,               _Count
351         )
352 
353     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2(
354         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnbcat,
355         _Inout_z_, unsigned char,        _Dest,
356         _In_z_     unsigned char const*, _Source,
357         _In_       size_t,               _Count
358         )
359 
360     _DCRTIMP errno_t __cdecl _mbsnbcat_s_l(
361         _Inout_updates_z_(_DstSizeInBytes) unsigned char*       _Dst,
362         _In_                               size_t               _DstSizeInBytes,
363         _In_z_                             unsigned char const* _Src,
364         _In_                               size_t               _MaxCount,
365         _In_opt_                           _locale_t            _Locale
366         );
367 
368     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
369         errno_t, _mbsnbcat_s_l,
370                  unsigned char,        _Dest,
371         _In_z_   unsigned char const*, _Source,
372         _In_     size_t,               _Count,
373         _In_opt_ _locale_t,            _Locale
374         )
375 
376     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_EX(
377         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnbcat_l, _mbsnbcat_s_l,
378         _Inout_updates_z_(_Size) unsigned char,
379         _Inout_z_,               unsigned char,        _Dest,
380         _In_z_                   unsigned char const*, _Source,
381         _In_                     size_t,               _Count,
382         _In_opt_                 _locale_t,            _Locale
383         )
384 
385     _Check_return_
386     _DCRTIMP int __cdecl _mbsnbcmp(
387         _In_z_ unsigned char const* _Str1,
388         _In_z_ unsigned char const* _Str2,
389         _In_   size_t               _MaxCount
390         );
391 
392     _Check_return_
393     _DCRTIMP int __cdecl _mbsnbcmp_l(
394         _In_z_   unsigned char const* _Str1,
395         _In_z_   unsigned char const* _Str2,
396         _In_     size_t               _MaxCount,
397         _In_opt_ _locale_t            _Locale
398         );
399 
400     _Check_return_
401     _DCRTIMP int __cdecl _mbsnbcoll(
402         _In_z_ unsigned char const* _Str1,
403         _In_z_ unsigned char const* _Str2,
404         _In_   size_t               _MaxCount
405         );
406 
407     _Check_return_
408     _DCRTIMP int __cdecl _mbsnbcoll_l(
409         _In_z_   unsigned char const* _Str1,
410         _In_z_   unsigned char const* _Str2,
411         _In_     size_t               _MaxCount,
412         _In_opt_ _locale_t            _Locale
413         );
414 
415     _Check_return_
416     _DCRTIMP size_t __cdecl _mbsnbcnt(
417         _In_reads_or_z_(_MaxCount) unsigned char const* _String,
418         _In_                       size_t               _MaxCount
419         );
420 
421     _Check_return_
422     _DCRTIMP size_t __cdecl _mbsnbcnt_l(
423         _In_reads_or_z_(_MaxCount) unsigned char const* _String,
424         _In_                       size_t               _MaxCount,
425         _In_opt_                   _locale_t            _Locale
426         );
427 
428     _DCRTIMP errno_t __cdecl _mbsnbcpy_s(
429         _Out_writes_z_(_SizeInBytes) unsigned char*       _Dst,
430         _In_                         size_t               _SizeInBytes,
431         _In_z_                       unsigned char const* _Src,
432         _In_                         size_t               _MaxCount
433         );
434 
435     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
436         errno_t, _mbsnbcpy_s,
437                unsigned char,        _Dest,
438         _In_z_ unsigned char const*, _Source,
439         _In_   size_t,               _Count
440         )
441 
442     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2(
443         _Success_(return != 0) unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnbcpy,
444         _Out_writes_(_Count) _Post_maybez_, unsigned char,        _Dest,
445         _In_z_                              unsigned char const*, _Source,
446         _In_                                size_t,               _Count
447         )
448 
449     _DCRTIMP errno_t __cdecl _mbsnbcpy_s_l(
450         _Out_writes_z_(_DstSizeInBytes) unsigned char*       _Dst,
451         _In_                            size_t               _DstSizeInBytes,
452         _In_z_                          unsigned char const* _Src,
453         _In_                            size_t               _MaxCount,
454         _In_opt_                        _locale_t            _Locale
455         );
456 
457     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
458         errno_t, _mbsnbcpy_s_l,
459                  unsigned char,        _Dest,
460         _In_z_   unsigned char const*, _Source,
461         _In_     size_t,               _Count,
462         _In_opt_ _locale_t,            _Locale
463         )
464 
465     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_EX(
466         _Success_(return != 0) unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnbcpy_l, _mbsnbcpy_s_l,
467         _Out_writes_z_(_Size)               unsigned char,
468         _Out_writes_(_Count) _Post_maybez_, unsigned char,        _Dest,
469         _In_z_                              unsigned char const*, _Source,
470         _In_                                size_t,               _Count,
471         _In_opt_                            _locale_t,            _Locale
472         )
473 
474     _Check_return_
475     _DCRTIMP int __cdecl _mbsnbicmp(
476         _In_z_ unsigned char const* _Str1,
477         _In_z_ unsigned char const* _Str2,
478         _In_   size_t               _MaxCount
479         );
480 
481     _Check_return_
482     _DCRTIMP int __cdecl _mbsnbicmp_l(
483         _In_z_   unsigned char const* _Str1,
484         _In_z_   unsigned char const* _Str2,
485         _In_     size_t               _MaxCount,
486         _In_opt_ _locale_t            _Locale
487         );
488 
489     _Check_return_
490     _DCRTIMP int __cdecl _mbsnbicoll(
491         _In_z_ unsigned char const* _Str1,
492         _In_z_ unsigned char const* _Str2,
493         _In_   size_t               _MaxCount
494         );
495 
496     _Check_return_
497     _DCRTIMP int __cdecl _mbsnbicoll_l(
498         _In_z_   unsigned char const* _Str1,
499         _In_z_   unsigned char const* _Str2,
500         _In_     size_t               _MaxCount,
501         _In_opt_ _locale_t            _Locale
502         );
503 
504     _DCRTIMP errno_t __cdecl _mbsnbset_s(
505         _Inout_updates_z_(_SizeInBytes) unsigned char* _Dst,
506         _In_                            size_t         _SizeInBytes,
507         _In_                            unsigned int   _C,
508         _In_                            size_t         _MaxCount
509         );
510 
511     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
512         errno_t, _mbsnbset_s,
513         _Prepost_z_ unsigned char, _Dest,
514         _In_        unsigned int,  _Val,
515         _In_        size_t,        _MaxCount
516         )
517 
518     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX(
519         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnbset, _mbsnbset_s,
520         _Inout_updates_z_(_Size)      unsigned char,
521         _Inout_updates_z_(_MaxCount), unsigned char, _String,
522         _In_                          unsigned int,  _Val,
523         _In_                          size_t,        _MaxCount
524         )
525 
526     _DCRTIMP errno_t __cdecl _mbsnbset_s_l(
527         _Inout_updates_z_(_DstSizeInBytes) unsigned char* _Dst,
528         _In_                               size_t         _DstSizeInBytes,
529         _In_                               unsigned int   _Ch,
530         _In_                               size_t         _MaxCount,
531         _In_opt_                           _locale_t      _Locale
532         );
533 
534     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
535         errno_t, _mbsnbset_s_l,
536         _Prepost_z_ unsigned char, _Dest,
537         _In_        unsigned int,  _Val,
538         _In_        size_t,        _MaxCount,
539         _In_opt_    _locale_t,     _Locale
540         )
541 
542     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_EX(
543         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnbset_l, _mbsnbset_s_l,
544         _Inout_updates_z_(_Size)      unsigned char,
545         _Inout_updates_z_(_MaxCount), unsigned char, _String,
546         _In_                          unsigned int,  _Val,
547         _In_                          size_t,        _MaxCount,
548         _In_opt_                      _locale_t,     _Locale
549         )
550 
551     _DCRTIMP errno_t __cdecl _mbsncat_s(
552         _Inout_updates_z_(_SizeInBytes) unsigned char*       _Dst,
553         _In_                            size_t               _SizeInBytes,
554         _In_z_                          unsigned char const* _Src,
555         _In_                            size_t               _MaxCount
556         );
557 
558     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
559         errno_t, _mbsncat_s,
560                unsigned char,        _Dest,
561         _In_z_ unsigned char const*, _Source,
562         _In_   size_t,               _Count
563         )
564 
565     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2(
566         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsncat,
567         _Inout_z_, unsigned char,        _Dest,
568         _In_z_     unsigned char const*, _Source,
569         _In_       size_t,               _Count
570         )
571 
572     _DCRTIMP errno_t __cdecl _mbsncat_s_l(
573         _Inout_updates_z_(_DstSizeInBytes) unsigned char*       _Dst,
574         _In_                               size_t               _DstSizeInBytes,
575         _In_z_                             unsigned char const* _Src,
576         _In_                               size_t               _MaxCount,
577         _In_opt_                           _locale_t            _Locale
578         );
579 
580     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
581         errno_t, _mbsncat_s_l,
582                  unsigned char,        _Dest,
583         _In_z_   unsigned char const*, _Source,
584         _In_     size_t,               _Count,
585         _In_opt_ _locale_t,            _Locale
586         )
587 
588     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_EX(
589         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsncat_l, _mbsncat_s_l,
590         _Inout_updates_z_(_Size) unsigned char,
591         _Inout_z_,               unsigned char,        _Dest,
592         _In_z_                   unsigned char const*, _Source,
593         _In_                     size_t,               _Count,
594         _In_opt_                 _locale_t,            _Locale
595         )
596 
597     _Check_return_
598     _DCRTIMP size_t __cdecl _mbsnccnt(
599         _In_reads_or_z_(_MaxCount) unsigned char const* _Str,
600         _In_                       size_t               _MaxCount
601         );
602 
603     _Check_return_
604     _DCRTIMP size_t __cdecl _mbsnccnt_l(
605         _In_reads_or_z_(_MaxCount) unsigned char const* _Str,
606         _In_                       size_t               _MaxCount,
607         _In_opt_                   _locale_t            _Locale
608         );
609 
610     _Check_return_
611     _DCRTIMP int __cdecl _mbsncmp(
612         _In_reads_or_z_(_MaxCount) unsigned char const* _Str1,
613         _In_z_                     unsigned char const* _Str2,
614         _In_                       size_t               _MaxCount
615         );
616 
617     _Check_return_
618     _DCRTIMP int __cdecl _mbsncmp_l(
619         _In_reads_or_z_(_MaxCount) unsigned char const* _Str1,
620         _In_z_                     unsigned char const* _Str2,
621         _In_                       size_t               _MaxCount,
622         _In_opt_                   _locale_t            _Locale
623         );
624 
625     _Check_return_
626     _DCRTIMP int __cdecl _mbsncoll(
627         _In_z_ unsigned char const* _Str1,
628         _In_z_ unsigned char const* _Str2,
629         _In_   size_t               _MaxCount
630         );
631 
632     _Check_return_
633     _DCRTIMP int __cdecl _mbsncoll_l(
634         _In_z_   unsigned char const* _Str1,
635         _In_z_   unsigned char const* _Str2,
636         _In_     size_t               _MaxCount,
637         _In_opt_ _locale_t            _Locale
638         );
639 
640     _DCRTIMP errno_t __cdecl _mbsncpy_s(
641         _Out_writes_z_(_SizeInBytes) unsigned char*       _Dst,
642         _In_                         size_t               _SizeInBytes,
643         _In_z_                       unsigned char const* _Src,
644         _In_                         size_t               _MaxCount
645         );
646 
647     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
648         errno_t, _mbsncpy_s,
649                unsigned char,        _Dest,
650         _In_z_ unsigned char const*, _Source,
651         _In_   size_t,               _Count
652         )
653 
654     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2(
655         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsncpy,
656         _Pre_notnull_ _Out_writes_(2 * _Count) _Post_maybez_, unsigned char,        _Dest,
657         _In_z_                                                unsigned char const*, _Source,
658         _In_                                                  size_t,               _Count
659         )
660 
661     _DCRTIMP errno_t __cdecl _mbsncpy_s_l(
662         _Out_writes_z_(_DstSizeInBytes) unsigned char*       _Dst,
663         _In_                            size_t               _DstSizeInBytes,
664         _In_z_                          unsigned char const* _Src,
665         _In_                            size_t               _MaxCount,
666         _In_opt_                        _locale_t            _Locale
667         );
668 
669     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
670         errno_t, _mbsncpy_s_l,
671                  unsigned char,        _Dest,
672         _In_z_   unsigned char const*, _Source,
673         _In_     size_t,               _Count,
674         _In_opt_ _locale_t,            _Locale
675         )
676 
677     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_EX(
678         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsncpy_l, _mbsncpy_s_l,
679         _Out_writes_z_(_Size)               unsigned char,
680         _Out_writes_(_Count) _Post_maybez_, unsigned char,        _Dest,
681         _In_z_                              unsigned char const*, _Source,
682         _In_                                size_t,               _Count,
683         _In_opt_                            _locale_t,            _Locale
684         )
685 
686     _Check_return_
687     _DCRTIMP unsigned int __cdecl _mbsnextc(
688         _In_z_ unsigned char const* _String
689         );
690 
691     _Check_return_
692     _DCRTIMP unsigned int __cdecl _mbsnextc_l(
693         _In_z_   unsigned char const* _String,
694         _In_opt_ _locale_t            _Locale
695         );
696 
697     _Check_return_
698     _DCRTIMP int __cdecl _mbsnicmp(
699         _In_reads_or_z_(_MaxCount) unsigned char const* _Str1,
700         _In_reads_or_z_(_MaxCount) unsigned char const* _Str2,
701         _In_   size_t               _MaxCount
702         );
703 
704     _Check_return_
705     _DCRTIMP int __cdecl _mbsnicmp_l(
706         _In_reads_or_z_(_MaxCount) unsigned char const* _Str1,
707         _In_reads_or_z_(_MaxCount) unsigned char const* _Str2,
708         _In_     size_t               _MaxCount,
709         _In_opt_ _locale_t            _Locale
710         );
711 
712     _Check_return_
713     _DCRTIMP int __cdecl _mbsnicoll(
714         _In_reads_or_z_(_MaxCount) unsigned char const* _Str1,
715         _In_reads_or_z_(_MaxCount) unsigned char const* _Str2,
716         _In_   size_t               _MaxCount
717         );
718 
719     _Check_return_
720     _DCRTIMP int __cdecl _mbsnicoll_l(
721         _In_reads_or_z_(_MaxCount) unsigned char const* _Str1,
722         _In_reads_or_z_(_MaxCount) unsigned char const* _Str2,
723         _In_     size_t               _MaxCount,
724         _In_opt_ _locale_t            _Locale
725         );
726 
727     _Check_return_
728     _DCRTIMP unsigned char*  __cdecl _mbsninc(
729         _In_reads_or_z_(_Count) unsigned char const* _String,
730         _In_                    size_t               _Count
731         );
732 
733     _Check_return_
734     _DCRTIMP unsigned char*  __cdecl _mbsninc_l(
735         _In_reads_or_z_(_Count) unsigned char const* _String,
736         _In_                    size_t               _Count,
737         _In_opt_                _locale_t            _Locale
738         );
739 
740     _DCRTIMP errno_t __cdecl _mbsnset_s(
741         _Inout_updates_z_(_SizeInBytes) unsigned char* _Dst,
742         _In_                            size_t         _SizeInBytes,
743         _In_                            unsigned int   _Val,
744         _In_                            size_t         _MaxCount
745         );
746 
747     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
748         errno_t, _mbsnset_s,
749         _Prepost_z_ unsigned char, _Dest,
750         _In_        unsigned int,  _Val,
751         _In_        size_t,        _MaxCount
752         )
753 
754     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX(
755         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsnset, _mbsnset_s,
756         _Inout_updates_z_(_Size)      unsigned char,
757         _Inout_updates_z_(_MaxCount), unsigned char, _String,
758         _In_                          unsigned int,  _Val,
759         _In_                          size_t,        _MaxCount
760         )
761 
762     _DCRTIMP errno_t __cdecl _mbsnset_s_l(
763         _Inout_updates_z_(_DstSizeInBytes) unsigned char* _Dst,
764         _In_                               size_t         _DstSizeInBytes,
765         _In_                               unsigned int   _Val,
766         _In_                               size_t         _MaxCount,
767         _In_opt_                          _locale_t       _Locale
768         );
769 
770     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
771         errno_t, _mbsnset_s_l,
772         _Prepost_z_ unsigned char, _Dest,
773         _In_        unsigned int,  _Val,
774         _In_        size_t,        _MaxCount,
775         _In_opt_    _locale_t,     _Locale
776         )
777 
778     __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_EX(
779         unsigned char* , __RETURN_POLICY_DST, _DCRTIMP, _mbsnset_l, _mbsnset_s_l,
780         _Inout_updates_z_(_Size)      unsigned char,
781         _Inout_updates_z_(_MaxCount), unsigned char, _String,
782         _In_                          unsigned int,  _Val,
783         _In_                          size_t,        _MaxCount,
784         _In_opt_                      _locale_t,     _Locale
785         )
786 
787     _Check_return_
788     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbspbrk(
789         _In_z_ unsigned char const* _String,
790         _In_z_ unsigned char const* _Control
791         );
792 
793     _Check_return_
794     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbspbrk_l(
795         _In_z_   unsigned char const* _String,
796         _In_z_   unsigned char const* _Control,
797         _In_opt_ _locale_t            _Locale
798         );
799 
800     _Check_return_
801     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbsrchr(
802         _In_z_ unsigned char const* _String,
803         _In_   unsigned int         _C
804         );
805 
806     _Check_return_
807     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbsrchr_l(
808         _In_z_   unsigned char const* _String,
809         _In_     unsigned int         _C,
810         _In_opt_ _locale_t            _Locale
811         );
812 
813     _DCRTIMP unsigned char* __cdecl _mbsrev(
814         _Inout_z_ unsigned char* _String
815         );
816 
817     _DCRTIMP unsigned char* __cdecl _mbsrev_l(
818         _Inout_z_ unsigned char* _String,
819         _In_opt_  _locale_t      _Locale
820         );
821 
822     _DCRTIMP errno_t __cdecl _mbsset_s(
823         _Inout_updates_z_(_SizeInBytes) unsigned char* _Dst,
824         _In_                            size_t         _SizeInBytes,
825         _In_                            unsigned int   _Val
826         );
827 
828     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
829         errno_t, _mbsset_s,
830         _Prepost_z_ unsigned char, _Dest,
831         _In_        unsigned int,  _Val
832         )
833 
834     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(
835         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsset, _mbsset_s,
836         _Inout_updates_z_(_Size) unsigned char,
837         _Inout_z_,               unsigned char, _String,
838         _In_                     unsigned int,  _Val
839         )
840 
841     _DCRTIMP errno_t __cdecl _mbsset_s_l(
842         _Inout_updates_z_(_DstSizeInBytes) unsigned char* _Dst,
843         _In_                               size_t         _DstSizeInBytes,
844         _In_                               unsigned int   _Val,
845         _In_opt_                           _locale_t      _Locale
846         );
847 
848     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
849         errno_t, _mbsset_s_l,
850         _Prepost_z_ unsigned char, _Dest,
851         _In_        unsigned int,  _Val,
852         _In_opt_    _locale_t,     _Locale
853         )
854 
855     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(
856         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsset_l, _mbsset_s_l,
857         _Inout_updates_z_(_Size) unsigned char,
858         _Inout_z_,               unsigned char, _String,
859         _In_                     unsigned int,  _Val,
860         _In_opt_                 _locale_t,     _Locale
861         )
862 
863     _Check_return_
864     _DCRTIMP size_t __cdecl _mbsspn(
865         _In_z_ unsigned char const* _Str,
866         _In_z_ unsigned char const* _Control
867         );
868 
869     _Check_return_
870     _DCRTIMP size_t __cdecl _mbsspn_l(
871         _In_z_   unsigned char const* _Str,
872         _In_z_   unsigned char const* _Control,
873         _In_opt_ _locale_t            _Locale
874         );
875 
876     _Check_return_
877     _DCRTIMP unsigned char* __cdecl _mbsspnp(
878         _In_z_ unsigned char const* _Str1,
879         _In_z_ unsigned char const* _Str2
880         );
881 
882     _Check_return_
883     _DCRTIMP unsigned char* __cdecl _mbsspnp_l(
884         _In_z_   unsigned char const* _Str1,
885         _In_z_   unsigned char const* _Str2,
886         _In_opt_ _locale_t            _Locale
887         );
888 
889     _Check_return_ _Ret_maybenull_
890     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbsstr(
891         _In_z_ unsigned char const* _Str,
892         _In_z_ unsigned char const* _Substr
893         );
894 
895     _Check_return_ _Ret_maybenull_
896     _DCRTIMP _CONST_RETURN unsigned char* __cdecl _mbsstr_l(
897         _In_z_   unsigned char const* _Str,
898         _In_z_   unsigned char const* _Substr,
899         _In_opt_ _locale_t            _Locale
900         );
901 
902     _Check_return_ _CRT_INSECURE_DEPRECATE(_mbstok_s)
903     _DCRTIMP unsigned char* __cdecl _mbstok(
904         _Inout_opt_z_ unsigned char*       _Str,
905         _In_z_        unsigned char const* _Delim
906         );
907 
908     _Check_return_ _CRT_INSECURE_DEPRECATE(_mbstok_s_l)
909     _DCRTIMP unsigned char* __cdecl _mbstok_l(
910         _Inout_opt_z_ unsigned char*       _Str,
911         _In_z_        unsigned char const* _Delim,
912         _In_opt_      _locale_t            _Locale
913         );
914 
915     _Check_return_
916     _DCRTIMP unsigned char* __cdecl _mbstok_s(
917         _Inout_opt_z_                 unsigned char*       _Str,
918         _In_z_                        unsigned char const* _Delim,
919         _Inout_ _Deref_prepost_opt_z_ unsigned char**      _Context
920         );
921 
922     _Check_return_
923     _DCRTIMP unsigned char* __cdecl _mbstok_s_l(
924         _Inout_opt_z_                 unsigned char*       _Str,
925         _In_z_                        unsigned char const* _Delim,
926         _Inout_ _Deref_prepost_opt_z_ unsigned char**      _Context,
927         _In_opt_                      _locale_t            _Locale
928         );
929 
930     _DCRTIMP errno_t __cdecl _mbsupr_s(
931         _Inout_updates_z_(_SizeInBytes) unsigned char* _Str,
932         _In_                            size_t         _SizeInBytes
933         );
934 
935     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(
936         errno_t, _mbsupr_s,
937         _Inout_updates_z_(_Size) unsigned char, _String
938         )
939 
940     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(
941         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsupr,
942         _Inout_z_, unsigned char, _String
943         )
944 
945     _DCRTIMP errno_t __cdecl _mbsupr_s_l(
946         _Inout_updates_z_(_SizeInBytes) unsigned char* _Str,
947         _In_                            size_t         _SizeInBytes,
948         _In_opt_                        _locale_t      _Locale
949         );
950 
951     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
952         errno_t, _mbsupr_s_l,
953                  unsigned char, _String,
954         _In_opt_ _locale_t,     _Locale
955         )
956 
957     __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(
958         unsigned char*, __RETURN_POLICY_DST, _DCRTIMP, _mbsupr_l, _mbsupr_s_l,
959         _Inout_updates_z_(_Size) unsigned char,
960         _Inout_z_,               unsigned char, _String,
961         _In_opt_                 _locale_t,     _Locale
962         )
963 
964     _Check_return_
965     _DCRTIMP size_t __cdecl _mbclen(
966         _In_z_ unsigned char const* _String
967         );
968 
969     _Check_return_
970     _DCRTIMP size_t __cdecl _mbclen_l(
971         _In_z_   unsigned char const* _String,
972         _In_opt_ _locale_t            _Locale
973         );
974 
975     _CRT_INSECURE_DEPRECATE(_mbccpy_s)
976     _DCRTIMP void __cdecl _mbccpy(
977         _Out_writes_bytes_(2) unsigned char*       _Dst,
978         _In_z_                unsigned char const* _Src
979         );
980 
981     _CRT_INSECURE_DEPRECATE(_mbccpy_s_l)
982     _DCRTIMP void __cdecl _mbccpy_l(
983         _Out_writes_bytes_(2) unsigned char*       _Dst,
984         _In_z_                unsigned char const* _Src,
985         _In_opt_              _locale_t            _Locale
986         );
987 
988     _DCRTIMP errno_t __cdecl _mbccpy_s(
989         _Out_writes_z_(_SizeInBytes) unsigned char*       _Dst,
990         _In_                         size_t               _SizeInBytes,
991         _Out_opt_                    int*                 _PCopied,
992         _In_z_                       unsigned char const* _Src
993         );
994 
995     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(
996         errno_t, _mbccpy_s,
997                   unsigned char,        _Dest,
998         _Out_opt_ int*,                 _PCopied,
999         _In_z_    unsigned char const*, _Source
1000         )
1001 
1002     _DCRTIMP errno_t __cdecl _mbccpy_s_l(
1003         _Out_writes_bytes_(_DstSizeInBytes) unsigned char*       _Dst,
1004         _In_                                size_t               _DstSizeInBytes,
1005         _Out_opt_                           int*                 _PCopied,
1006         _In_z_                              unsigned char const* _Src,
1007         _In_opt_                            _locale_t            _Locale
1008         );
1009 
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(errno_t,_mbccpy_s_l,unsigned char,_Dest,_Out_opt_ int *,_PCopied,_In_z_ unsigned char const *,_Source,_In_opt_ _locale_t,_Locale)1010     __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(
1011         errno_t, _mbccpy_s_l,
1012                   unsigned char,        _Dest,
1013         _Out_opt_ int*,                 _PCopied,
1014         _In_z_    unsigned char const*, _Source,
1015         _In_opt_  _locale_t,            _Locale
1016         )
1017 
1018     #define _mbccmp(_cpc1, _cpc2) _mbsncmp((_cpc1), (_cpc2), 1)
1019 
1020 
1021 
1022     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1023     //
1024     // Const-Correct C++ Overloads
1025     //
1026     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1027     #ifndef _EXCLUDE_MBSTRING_CONST_CORRECT_OVERLOADS
1028     #ifdef __cplusplus
1029     extern "C++" {
1030 
1031         _Check_return_
1032         inline unsigned char* __CRTDECL _mbschr(
1033             _In_z_ unsigned char* const _String,
1034             _In_   unsigned int   const _Char
1035             )
1036         {
1037             unsigned char const* const _ConstString = _String;
1038             return const_cast<unsigned char*>(_mbschr(_ConstString, _Char));
1039         }
1040 
1041         _Check_return_
1042         inline unsigned char* __CRTDECL _mbschr_l(
1043             _In_z_   unsigned char* const _String,
1044             _In_     unsigned int   const _Char,
1045             _In_opt_ _locale_t      const _Locale
1046             )
1047         {
1048             unsigned char const* const _ConstString = _String;
1049             return const_cast<unsigned char*>(_mbschr_l(_ConstString, _Char, _Locale));
1050         }
1051 
1052         _Check_return_
1053         inline unsigned char* __CRTDECL _mbspbrk(
1054             _In_z_ unsigned char*       const _String,
1055             _In_z_ unsigned char const* const _CharSet
1056             )
1057         {
1058             unsigned char const* const _ConstString = _String;
1059             return const_cast<unsigned char*>(_mbspbrk(_ConstString, _CharSet));
1060         }
1061 
1062         _Check_return_
1063         inline unsigned char* __CRTDECL _mbspbrk_l(
1064             _In_z_   unsigned char*       const _String,
1065             _In_z_   unsigned char const* const _CharSet,
1066             _In_opt_ _locale_t            const _Locale
1067             )
1068         {
1069             unsigned char const* const _ConstString = _String;
1070             return const_cast<unsigned char*>(_mbspbrk_l(_ConstString, _CharSet, _Locale));
1071         }
1072 
1073         _Check_return_
1074         inline unsigned char* __CRTDECL _mbsrchr(
1075             _In_z_ unsigned char* const _String,
1076             _In_   unsigned int   const _Char
1077             )
1078         {
1079             unsigned char const* const _ConstString = _String;
1080             return const_cast<unsigned char*>(_mbsrchr(_ConstString, _Char));
1081         }
1082 
1083         _Check_return_
1084         inline unsigned char* __CRTDECL _mbsrchr_l(
1085             _In_z_   unsigned char* const _String,
1086             _In_     unsigned int   const _Char,
1087             _In_opt_ _locale_t      const _Locale
1088             )
1089         {
1090             unsigned char const* const _ConstString = _String;
1091             return const_cast<unsigned char*>(_mbsrchr_l(_ConstString, _Char, _Locale));
1092         }
1093 
1094         _Check_return_ _Ret_maybenull_
1095         inline unsigned char* __CRTDECL _mbsstr(
1096             _In_z_ unsigned char*       const _String,
1097             _In_z_ unsigned char const* const _Match
1098             )
1099         {
1100             unsigned char const* const _ConstString = _String;
1101             return const_cast<unsigned char*>(_mbsstr(_ConstString, _Match));
1102         }
1103 
1104         _Check_return_ _Ret_maybenull_
1105         inline unsigned char* __CRTDECL _mbsstr_l(
1106             _In_z_   unsigned char*       const _String,
1107             _In_z_   unsigned char const* const _Match,
1108             _In_opt_ _locale_t            const _Locale
1109             )
1110         {
1111             unsigned char const* const _ConstString = _String;
1112             return const_cast<unsigned char*>(_mbsstr_l(_ConstString, _Match, _Locale));
1113         }
1114 
1115     } // extern "C++"
1116     #endif // __cplusplus
1117     #endif // _EXCLUDE_MBSTRING_CONST_CORRECT_OVERLOADS
1118 
1119 
1120 
1121     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1122     //
1123     // Multibyte Character Classification and Conversion Functions
1124     //
1125     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1126     _Check_return_ _DCRTIMP int __cdecl _ismbcalnum(_In_ unsigned int _C);
1127     _Check_return_ _DCRTIMP int __cdecl _ismbcalpha(_In_ unsigned int _C);
1128     _Check_return_ _DCRTIMP int __cdecl _ismbcdigit(_In_ unsigned int _C);
1129     _Check_return_ _DCRTIMP int __cdecl _ismbcgraph(_In_ unsigned int _C);
1130     _Check_return_ _DCRTIMP int __cdecl _ismbclegal(_In_ unsigned int _C);
1131     _Check_return_ _DCRTIMP int __cdecl _ismbclower(_In_ unsigned int _C);
1132     _Check_return_ _DCRTIMP int __cdecl _ismbcprint(_In_ unsigned int _C);
1133     _Check_return_ _DCRTIMP int __cdecl _ismbcpunct(_In_ unsigned int _C);
1134     _Check_return_ _DCRTIMP int __cdecl _ismbcblank(_In_ unsigned int _C);
1135     _Check_return_ _DCRTIMP int __cdecl _ismbcspace(_In_ unsigned int _C);
1136     _Check_return_ _DCRTIMP int __cdecl _ismbcupper(_In_ unsigned int _C);
1137 
1138     _Check_return_ _DCRTIMP int __cdecl _ismbcalnum_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1139     _Check_return_ _DCRTIMP int __cdecl _ismbcalpha_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1140     _Check_return_ _DCRTIMP int __cdecl _ismbcdigit_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1141     _Check_return_ _DCRTIMP int __cdecl _ismbcgraph_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1142     _Check_return_ _DCRTIMP int __cdecl _ismbclegal_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1143     _Check_return_ _DCRTIMP int __cdecl _ismbclower_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1144     _Check_return_ _DCRTIMP int __cdecl _ismbcprint_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1145     _Check_return_ _DCRTIMP int __cdecl _ismbcpunct_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1146     _Check_return_ _DCRTIMP int __cdecl _ismbcblank_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1147     _Check_return_ _DCRTIMP int __cdecl _ismbcspace_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1148     _Check_return_ _DCRTIMP int __cdecl _ismbcupper_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1149 
1150     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctolower(_In_ unsigned int _Ch);
1151     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctoupper(_In_ unsigned int _Ch);
1152 
1153     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctolower_l(_In_ unsigned int _Ch, _In_opt_ _locale_t _Locale);
1154     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctoupper_l(_In_ unsigned int _Ch, _In_opt_ _locale_t _Locale);
1155 
1156 
1157 
1158     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1159     //
1160     // Multibyte Character Kanji Classification and Conversion Functions
1161     //
1162     //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1163     _Check_return_ _DCRTIMP int __cdecl _ismbchira  (_In_ unsigned int _C);
1164     _Check_return_ _DCRTIMP int __cdecl _ismbckata  (_In_ unsigned int _C);
1165     _Check_return_ _DCRTIMP int __cdecl _ismbcsymbol(_In_ unsigned int _C);
1166     _Check_return_ _DCRTIMP int __cdecl _ismbcl0    (_In_ unsigned int _C);
1167     _Check_return_ _DCRTIMP int __cdecl _ismbcl1    (_In_ unsigned int _C);
1168     _Check_return_ _DCRTIMP int __cdecl _ismbcl2    (_In_ unsigned int _C);
1169 
1170     _Check_return_ _DCRTIMP int __cdecl _ismbchira_l  (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1171     _Check_return_ _DCRTIMP int __cdecl _ismbckata_l  (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1172     _Check_return_ _DCRTIMP int __cdecl _ismbcsymbol_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1173     _Check_return_ _DCRTIMP int __cdecl _ismbcl0_l    (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1174     _Check_return_ _DCRTIMP int __cdecl _ismbcl1_l    (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1175     _Check_return_ _DCRTIMP int __cdecl _ismbcl2_l    (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1176 
1177     _Check_return_ _DCRTIMP unsigned int __cdecl _mbcjistojms(_In_ unsigned int _C);
1178     _Check_return_ _DCRTIMP unsigned int __cdecl _mbcjmstojis(_In_ unsigned int _C);
1179     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctohira  (_In_ unsigned int _C);
1180     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctokata  (_In_ unsigned int _C);
1181 
1182     _Check_return_ _DCRTIMP unsigned int __cdecl _mbcjistojms_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1183     _Check_return_ _DCRTIMP unsigned int __cdecl _mbcjmstojis_l(_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1184     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctohira_l  (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1185     _Check_return_ _DCRTIMP unsigned int __cdecl _mbctokata_l  (_In_ unsigned int _C, _In_opt_ _locale_t _Locale);
1186 
1187 #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
1188 
1189 
1190 
1191 #if _CRT_FUNCTIONS_REQUIRED
1192     // Lead and trail bytes do not apply correctly to all encodings, including UTF-8.  Applications
1193     // are recommended to use the system codepage conversion APIs and not attempt to reverse
1194     // engineer the behavior of any particular encoding.  Lead and trail are always FALSE for UTF-8.
1195     _When_(_Ch == 0, _Post_equal_to_(0))
1196     _Check_return_ _DCRTIMP int __cdecl _ismbblead (_In_ unsigned int _Ch);
1197     _Check_return_ _DCRTIMP int __cdecl _ismbbtrail(_In_ unsigned int _Ch);
1198 
1199     _When_(_Ch == 0, _Post_equal_to_(0))
1200     _Check_return_ _DCRTIMP int __cdecl _ismbblead_l (_In_ unsigned int _Ch, _In_opt_ _locale_t _Locale);
1201     _Check_return_ _DCRTIMP int __cdecl _ismbbtrail_l(_In_ unsigned int _Ch, _In_opt_ _locale_t _Locale);
1202 
1203     _Check_return_
1204     _DCRTIMP int __cdecl _ismbslead(
1205         _In_reads_z_(_Pos - _String + 1) unsigned char const* _String,
1206         _In_z_                           unsigned char const* _Pos
1207         );
1208 
1209     _Check_return_
1210     _DCRTIMP int __cdecl _ismbslead_l(
1211         _In_reads_z_(_Pos - _String + 1) unsigned char const* _String,
1212         _In_z_                           unsigned char const* _Pos,
1213         _In_opt_                         _locale_t            _Locale
1214         );
1215 
1216     _Check_return_
1217     _ACRTIMP int __cdecl _ismbstrail(
1218         _In_reads_z_(_Pos - _String + 1) unsigned char const* _String,
1219         _In_z_                           unsigned char const* _Pos
1220         );
1221 
1222     _Check_return_
1223     _ACRTIMP int __cdecl _ismbstrail_l(
1224         _In_reads_z_(_Pos - _String + 1) unsigned char const* _String,
1225         _In_z_                           unsigned char const* _Pos,
1226         _In_opt_                         _locale_t            _Locale
1227         );
1228 #endif // _CRT_FUNCTIONS_REQUIRED
1229 
1230 
1231 
1232 _CRT_END_C_HEADER
1233 _UCRT_RESTORE_CLANG_WARNINGS
1234 #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
1235 #endif // _INC_MBSTRING
1236