#include <corecrt_internal.h>
#include <ctype.h>
#include <locale.h>
#include <string.h>
Go to the source code of this file.
◆ _wcsxfrm_l()
Definition at line 51 of file wcsxfrm.cpp.
57{
59
60
64
66
67 if ( _loc_update.GetLocaleT()->locinfo->locale_name[
LC_COLLATE] ==
nullptr )
68 {
70 wcsncpy(_string1, _string2, _count);
73 }
74
76 _loc_update.GetLocaleT()->locinfo->locale_name[
LC_COLLATE],
78 _string2,
79 -1,
80 nullptr,
81 0 )) )
82 {
85 } else
86 {
87 if (
size <= (
int)_count)
88 {
90 _loc_update.GetLocaleT()->locinfo->locale_name[
LC_COLLATE],
92 _string2,
93 -1,
94 (wchar_t *)_string1,
95 (int)_count )) )
96 {
99 } else
100 {
101
102
103
105 for (;_count-- > 0;)
106 {
107#pragma warning(suppress:__WARNING_DEREF_NULL_PTR __WARNING_POTENTIAL_BUFFER_OVERFLOW_HIGH_PRIORITY)
108 _string1[_count] = (
wchar_t)((
unsigned char *)_string1)[_count];
109 }
110 }
111 }
112 else
113 {
114 if (_string1 != nullptr && _count > 0)
115 {
116 *_string1 = '\0';
118 }
120 }
121 }
122
124}
int __cdecl __acrt_LCMapStringW(LPCWSTR const locale_name, DWORD const map_flags, LPCWSTR const source, int source_count, LPWSTR const destination, int const destination_count)
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE
#define _END_SECURE_CRT_DEPRECATION_DISABLE
Referenced by wcsxfrm().
◆ wcsxfrm()
Definition at line 126 of file wcsxfrm.cpp.
131{
132
133 return _wcsxfrm_l(_string1, _string2, _count,
nullptr);
134}
size_t __cdecl _wcsxfrm_l(wchar_t *_string1, const wchar_t *_string2, size_t _count, _locale_t plocinfo)