Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
GenericPlatformString.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "GenericPlatform/GenericPlatformStricmp.h"
7#include "Templates/EnableIf.h"
8#include "Traits/IsCharEncodingCompatibleWith.h"
9#include "Traits/IsCharEncodingSimplyConvertibleTo.h"
10#include "Traits/IsCharType.h"
11#include "Traits/IsFixedWidthCharEncoding.h"
12
13#include <type_traits>
14
15namespace UE::Core::Private
16{
17 // The Dest parameter is just used for overload resolution
18 ARK_API int32 GetConvertedLength(const UTF8CHAR* Dest, const WIDECHAR* Src);
19 ARK_API int32 GetConvertedLength(const UTF8CHAR* Dest, const WIDECHAR* Src, int32 SrcLen);
20 ARK_API int32 GetConvertedLength(const UTF8CHAR* Dest, const UCS2CHAR* Src);
21 ARK_API int32 GetConvertedLength(const UTF8CHAR* Dest, const UCS2CHAR* Src, int32 SrcLen);
22 ARK_API int32 GetConvertedLength(const UTF8CHAR* Dest, const UTF32CHAR* Src);
23 ARK_API int32 GetConvertedLength(const UTF8CHAR* Dest, const UTF32CHAR* Src, int32 SrcLen);
24 ARK_API int32 GetConvertedLength(const ANSICHAR* Dest, const UTF8CHAR* Src);
25 ARK_API int32 GetConvertedLength(const ANSICHAR* Dest, const UTF8CHAR* Src, int32 SrcLen);
26 ARK_API int32 GetConvertedLength(const WIDECHAR* Dest, const UTF8CHAR* Src);
27 ARK_API int32 GetConvertedLength(const WIDECHAR* Dest, const UTF8CHAR* Src, int32 SrcLen);
28 ARK_API int32 GetConvertedLength(const UCS2CHAR* Dest, const UTF8CHAR* Src);
29 ARK_API int32 GetConvertedLength(const UCS2CHAR* Dest, const UTF8CHAR* Src, int32 SrcLen);
30
31 ARK_API UTF8CHAR* Convert(UTF8CHAR* Dest, int32 DestLen, const WIDECHAR* Src);
32 ARK_API UTF8CHAR* Convert(UTF8CHAR* Dest, int32 DestLen, const WIDECHAR* Src, int32 SrcLen);
33 ARK_API UTF8CHAR* Convert(UTF8CHAR* Dest, int32 DestLen, const UCS2CHAR* Src);
34 ARK_API UTF8CHAR* Convert(UTF8CHAR* Dest, int32 DestLen, const UCS2CHAR* Src, int32 SrcLen);
35 ARK_API UTF8CHAR* Convert(UTF8CHAR* Dest, int32 DestLen, const UTF32CHAR* Src);
36 ARK_API UTF8CHAR* Convert(UTF8CHAR* Dest, int32 DestLen, const UTF32CHAR* Src, int32 SrcLen);
37 ARK_API ANSICHAR* Convert(ANSICHAR* Dest, int32 DestLen, const UTF8CHAR* Src);
38 ARK_API ANSICHAR* Convert(ANSICHAR* Dest, int32 DestLen, const UTF8CHAR* Src, int32 SrcLen);
39 ARK_API WIDECHAR* Convert(WIDECHAR* Dest, int32 DestLen, const UTF8CHAR* Src);
40 ARK_API WIDECHAR* Convert(WIDECHAR* Dest, int32 DestLen, const UTF8CHAR* Src, int32 SrcLen);
41 ARK_API UCS2CHAR* Convert(UCS2CHAR* Dest, int32 DestLen, const UTF8CHAR* Src);
42 ARK_API UCS2CHAR* Convert(UCS2CHAR* Dest, int32 DestLen, const UTF8CHAR* Src, int32 SrcLen);
43}
44
45// These will be moved inside GenericPlatformString.cpp when the platform layer handles UTF-16
46// instead of StringConv.h.
47#define HIGH_SURROGATE_START_CODEPOINT ((uint16)0xD800)
48#define HIGH_SURROGATE_END_CODEPOINT ((uint16)0xDBFF)
49#define LOW_SURROGATE_START_CODEPOINT ((uint16)0xDC00)
50#define LOW_SURROGATE_END_CODEPOINT ((uint16)0xDFFF)
51#define ENCODED_SURROGATE_START_CODEPOINT ((uint32)0x10000)
52#define ENCODED_SURROGATE_END_CODEPOINT ((uint32)0x10FFFF)
53
54#define UNICODE_BOGUS_CHAR_CODEPOINT '?'
55static_assert(sizeof(UNICODE_BOGUS_CHAR_CODEPOINT) <= sizeof(ANSICHAR) && (UNICODE_BOGUS_CHAR_CODEPOINT) >= 32 && (UNICODE_BOGUS_CHAR_CODEPOINT) <= 127, "The Unicode Bogus character point is expected to fit in a single ANSICHAR here");
56
57/**
58 * Generic string implementation for most platforms
59 */
61{
62 /**
63 * Tests whether an encoding has fixed-width characters
64 */
65 template <typename Encoding>
66 UE_DEPRECATED(5.1, "FPlatformString::IsFixedWidthEncoding<T>() has been deprecated in favor of TIsFixedWidthCharEncoding_V<T>")
67 static constexpr bool IsFixedWidthEncoding()
68 {
69 return TIsFixedWidthCharEncoding_V<Encoding>;
70 }
71
72 /**
73 * Function which returns whether one encoding type is binary compatible with another.
74 *
75 * Unlike TAreEncodingsCompatible, this is not commutative. For example, ANSI is compatible with
76 * UTF-8, but UTF-8 is not compatible with ANSI.
77 */
78 template <typename SrcEncoding, typename DestEncoding>
79 UE_DEPRECATED(5.1, "FPlatformString::IsCharEncodingCompatibleWith<A, B>() has been deprecated in favor of TIsCharEncodingCompatibleWith_V<A, B>")
80 static constexpr bool IsCharEncodingCompatibleWith()
81 {
82 return TIsCharEncodingCompatibleWith_V<SrcEncoding, DestEncoding>;
83 }
84
85 /**
86 * Tests whether you can simply (i.e. by assignment) encode code units from the source encoding as the destination encoding.
87 */
88 template <typename SourceEncoding, typename DestEncoding>
89 UE_DEPRECATED(5.1, "FPlatformString::IsCharEncodingSimplyConvertibleTo<A, B>() has been deprecated in favor of TIsCharEncodingSimplyConvertibleTo_V<A, B>")
90 static constexpr bool IsCharEncodingSimplyConvertibleTo()
91 {
92 return TIsCharEncodingSimplyConvertibleTo_V<SourceEncoding, DestEncoding>;
93 }
94
95 /**
96 * Tests whether a particular codepoint can be converted to the destination encoding.
97 *
98 * @param Ch The character to test.
99 * @return True if Ch can be encoded as a DestEncoding.
100 */
101 template <typename DestEncoding, typename SourceEncoding>
102 static constexpr bool CanConvertCodepoint(SourceEncoding Codepoint)
103 {
104 // It is assumed that the incoming codepoint is already valid and we're only testing if it can be converted to DestEncoding.
105
106 static_assert(TIsCharType<SourceEncoding>::Value, "Source encoding is not a char type");
107 static_assert(TIsCharType<DestEncoding >::Value, "Destination encoding is not a char type");
108
109 // This is only defined for fixed-width encodings, because codepoints cannot be represented in a single variable-width code unit.
110 static_assert(TIsFixedWidthCharEncoding_V<SourceEncoding>, "Source encoding is not fixed-width");
111
112 if constexpr (TIsCharEncodingSimplyConvertibleTo_V<SourceEncoding, DestEncoding>)
113 {
114 // Simple conversions mean conversion is always possible
115 return true;
116 }
117 else if constexpr (!TIsFixedWidthCharEncoding_V<DestEncoding>)
118 {
119 // Converting all codepoints to a variable-width encoding should always be possible
120 return true;
121 }
122 else if constexpr (std::is_same_v<DestEncoding, ANSICHAR>)
123 {
124 return (uint32)Codepoint <= 0x7F;
125 }
126 else
127 {
128 // The logic above should hopefully mean this branch is only taken for UTF32CHAR->UCS2CHAR.
129 // There's a variety of '16-bit' char types between platforms though, so let's just test sizes.
130 static_assert(sizeof(SourceEncoding) == 4 && sizeof(DestEncoding) == 2, "Unimplemented conversion");
131
132 // Can't encode more than 16-bit in UCS-2
133 return (uint32)Codepoint <= 0xFFFF;
134 }
135 }
136
137
138 /**
139 * Returns the string representing the name of the given encoding type.
140 *
141 * @return The name of the CharType as a TCHAR string.
142 */
143 template <typename Encoding>
144 static const TCHAR* GetEncodingTypeName();
145
146 static const ANSICHAR* GetEncodingName()
147 {
149 return "UTF-32LE";
150#else
151 return "UTF-16LE";
152#endif
153 }
154
155 /**
156 * True if the encoding type of the string is some form of unicode
157 */
158 static constexpr bool IsUnicodeEncoded = true;
159
160
161 /**
162 * Metafunction which tests whether a given character type represents a fixed-width encoding.
163 */
164 template <typename T>
165 struct UE_DEPRECATED(5.0, "TIsFixedWidthEncoding is deprecated, use TIsFixedWidthCharEncoding_V<T> instead.") TIsFixedWidthEncoding
166 {
167 enum { Value = TIsFixedWidthCharEncoding_V<T> };
168 };
169
170
171 /**
172 * Metafunction which tests whether two encodings are compatible.
173 *
174 * We'll say the encodings are compatible if they're both fixed-width and have the same size. This
175 * should be good enough and catches things like UCS2CHAR and WIDECHAR being equivalent.
176 * Specializations of this template can be provided for any other special cases.
177 * Same size is a minimum requirement.
178 */
179 template <typename EncodingA, typename EncodingB>
180 struct UE_DEPRECATED(5.0, "TAreEncodingsCompatible is deprecated, use TIsCharEncodingCompatibleWith_V<SrcEncoding, DestEncoding> instead.") TAreEncodingsCompatible
181 {
182 enum { Value = TIsFixedWidthCharEncoding_V<EncodingA> && TIsFixedWidthCharEncoding_V<EncodingB> && sizeof(EncodingA) == sizeof(EncodingB) };
183 };
184
185
186 /**
187 * Converts the null-terminated Src string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range, including a null terminator.
188 * If the Dest range is not big enough to hold the converted output, NULL is returned. In this case, nothing should be assumed about the contents of Dest.
189 *
190 * @param Dest The start of the destination buffer.
191 * @param DestSize The size of the destination buffer.
192 * @param Src The start of the string to convert.
193 * @return A pointer to one past the last-written element.
194 */
195 template <typename SourceEncoding, typename DestEncoding>
196 static FORCEINLINE DestEncoding* Convert(DestEncoding* Dest, int32 DestSize, const SourceEncoding* Src)
197 {
199 {
200 for (;;)
201 {
202 if (DestSize == 0)
203 {
204 return nullptr;
205 }
206
207 if (!(*Dest++ = (DestEncoding)*Src++))
208 {
209 return Dest;
210 }
211
212 --DestSize;
213 }
214 }
216 {
218 const SourceEncoding* SrcCopy = Src;
220
221 bool bInvalidChars = false;
222 for (;;)
223 {
224 if (DestSize == 0)
225 {
226 Dest = nullptr;
227 break;
228 }
229
231 *Dest++ = (DestEncoding)SrcCh;
232 if (!SrcCh)
233 {
234 break;
235 }
237
238 --DestSize;
239 }
240
241 if (bInvalidChars)
242 {
243 for (;;)
244 {
245 if (DestSizeCopy == 0)
246 {
247 break;
248 }
249
251 if (!SrcCh)
252 {
253 break;
254 }
256 {
258 }
259 ++DestCopy;
260
261 --DestSizeCopy;
262 }
263
265 }
266
267 return Dest;
268 }
269 else
270 {
272 if (Result)
273 {
274 *Result++ = (DestEncoding)0;
275 }
276 return Result;
277 }
278 }
279
280 /**
281 * Converts the [Src, Src+SrcSize) string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range.
282 * The Src range should contain a null terminator if a null terminator is required in the output.
283 * If the Dest range is not big enough to hold the converted output, NULL is returned. In this case, nothing should be assumed about the contents of Dest.
284 *
285 * @param Dest The start of the destination buffer.
286 * @param DestSize The size of the destination buffer.
287 * @param Src The start of the string to convert.
288 * @param SrcSize The number of Src elements to convert.
289 * @return A pointer to one past the last-written element.
290 */
291 template <typename SourceEncoding, typename DestEncoding>
292 static FORCEINLINE DestEncoding* Convert(DestEncoding* Dest, int32 DestSize, const SourceEncoding* Src, int32 SrcSize)
293 {
295 {
296 if (DestSize < SrcSize)
297 {
298 return nullptr;
299 }
300
301 return (DestEncoding*)Memcpy(Dest, Src, SrcSize * sizeof(SourceEncoding)) + SrcSize;
302 }
304 {
305 const int32 Size = DestSize <= SrcSize ? DestSize : SrcSize;
306 for (int I = 0; I < Size; ++I)
307 {
310 }
311
312 return DestSize < SrcSize ? nullptr : Dest + Size;
313 }
315 {
316 const int32 Size = DestSize <= SrcSize ? DestSize : SrcSize;
317 bool bInvalidChars = false;
318 for (int I = 0; I < Size; ++I)
319 {
323 }
324
325 if (bInvalidChars)
326 {
327 for (int I = 0; I < Size; ++I)
328 {
330 {
332 }
333 }
334
336 }
337
338 return DestSize < SrcSize ? nullptr : Dest + Size;
339 }
340 else
341 {
343 }
344 }
345
346
347 /**
348 * Returns the required buffer length for the null-terminated Src string when converted to the DestChar encoding.
349 * The returned length includes the space for the null terminator (equivalent to strlen+1).
350 *
351 * @param Src The start of the string to convert.
352 * @return The number of DestChar elements that Src will be converted into.
353 */
354 template <typename DestEncoding, typename SourceEncoding>
355 static int32 ConvertedLength(const SourceEncoding* Src)
356 {
358 {
359 int32 Result = 0;
360 while (*Src)
361 {
362 ++Src;
363 ++Result;
364 }
365 return Result + 1;
366 }
367 else
368 {
369 return UE::Core::Private::GetConvertedLength((DestEncoding*)nullptr, Src) + 1;
370 }
371 }
372
373 /**
374 * Returns the required buffer length for the [Src, Src+SrcSize) string when converted to the DestChar encoding.
375 * The Src range should contain a null terminator if a null terminator is required in the output.
376 *
377 * @param Src The start of the string to convert.
378 * @param SrcSize The number of Src elements to convert.
379 * @return The number of DestChar elements that Src will be converted into.
380 */
381 template <typename DestEncoding, typename SourceEncoding>
382 static int32 ConvertedLength(const SourceEncoding* Src, int32 SrcSize)
383 {
385 {
386 return SrcSize;
387 }
388 else
389 {
391 }
392 }
393
394 static int32 Strncmp(const ANSICHAR* String1, const ANSICHAR* String2, SIZE_T Count);
395 static int32 Strncmp(const WIDECHAR* String1, const ANSICHAR* String2, SIZE_T Count);
396 static int32 Strncmp(const UTF8CHAR* String1, const ANSICHAR* String2, SIZE_T Count);
397 static int32 Strncmp(const ANSICHAR* String1, const WIDECHAR* String2, SIZE_T Count);
398 static int32 Strncmp(const WIDECHAR* String1, const WIDECHAR* String2, SIZE_T Count);
399 static int32 Strncmp(const UTF8CHAR* String1, const WIDECHAR* String2, SIZE_T Count);
400 static int32 Strncmp(const ANSICHAR* String1, const UTF8CHAR* String2, SIZE_T Count);
401 static int32 Strncmp(const WIDECHAR* String1, const UTF8CHAR* String2, SIZE_T Count);
402 static int32 Strncmp(const UTF8CHAR* String1, const UTF8CHAR* String2, SIZE_T Count);
403
404private:
405 /**
406 * Forwarding function because we can't call FMemory::Memcpy directly due to #include ordering issues.
407 *
408 * @param Dest The destination buffer.
409 * @param Src The source buffer.
410 * @param Count The number of bytes to copy.
411 * @return Dest
412 */
413 static void* Memcpy(void* Dest, const void* Src, SIZE_T Count);
414
415
416 /**
417 * Logs a message about bogus characters which were detected during string conversion.
418 *
419 * @param Src Pointer to the null-terminated string being converted.
420 */
421 template <typename DestEncoding, typename SourceEncoding>
422 static void LogBogusChars(const SourceEncoding* Src) {};
423
424
425 /**
426 * Logs a message about bogus characters which were detected during string conversion.
427 *
428 * @param Src Pointer to the possibly-not-null-terminated string being converted.
429 * @param SrcSize Number of characters in the Src string.
430 */
431 template <typename DestEncoding, typename SourceEncoding>
432 static void LogBogusChars(const SourceEncoding* Src, int32 SrcSize) {};
433};
#define ARK_API
Definition Ark.h:16
#define checkSlow(expr)
#define checkfSlow(expr, format,...)
#define UE_BUILD_DOCS
Definition Build.h:38
#define UE_PTRDIFF_TO_INT32(argument)
#define UE_DEPRECATED(Version, Message)
#define HIGH_SURROGATE_START_CODEPOINT
#define LOW_SURROGATE_START_CODEPOINT
#define ENCODED_SURROGATE_START_CODEPOINT
#define UNICODE_BOGUS_CHAR_CODEPOINT
#define ENCODED_SURROGATE_END_CODEPOINT
#define PLATFORM_TCHAR_IS_4_BYTES
Definition Platform.h:253
FPlatformTypes::CHAR16 UCS2CHAR
A 16-bit character containing a UCS2 (Unicode, 16-bit, fixed-width) code unit, used for compatibility...
Definition Platform.h:975
#define TEXT(x)
Definition Platform.h:1108
#define PLATFORM_TCHAR_IS_CHAR16
Definition Platform.h:260
#define FORCEINLINE
Definition Platform.h:644
FPlatformTypes::CHAR32 UTF32CHAR
A 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit.
Definition Platform.h:979
void TrimStartInline()
Definition String.cpp:692
int32 StrncmpImpl(const CharType1 *String1, const CharType2 *String2, SIZE_T Count)
ARK_API UTF8CHAR * Convert(UTF8CHAR *Dest, int32 DestLen, const UTF32CHAR *Src, int32 SrcLen)
ARK_API int32 GetConvertedLength(const UTF8CHAR *, const UTF32CHAR *Source, int32 SourceLen)
ARK_API UTF8CHAR * Convert(UTF8CHAR *Dest, int32 DestLen, const WIDECHAR *Src)
ARK_API int32 GetConvertedLength(const WIDECHAR *, const UTF8CHAR *Source)
static FORCEINLINE bool IsEncodedSurrogate(const uint32 Codepoint)
ARK_API ANSICHAR * Convert(ANSICHAR *Dest, int32 DestLen, const UTF8CHAR *Src, int32 SrcLen)
ARK_API int32 GetConvertedLength(const UTF8CHAR *, const UCS2CHAR *Source)
ARK_API WIDECHAR * Convert(WIDECHAR *Dest, int32 DestLen, const UTF8CHAR *Src)
ARK_API int32 GetConvertedLength(const UTF8CHAR *, const UTF32CHAR *Source)
static FORCEINLINE bool IsHighSurrogate(const uint32 Codepoint)
ARK_API UTF8CHAR * Convert(UTF8CHAR *Dest, int32 DestLen, const WIDECHAR *Src, int32 SrcLen)
ARK_API int32 GetConvertedLength(const UCS2CHAR *, const UTF8CHAR *Source)
static int32 ConvertFromUTF8(DestBufferType &ConvertedBuffer, int32 DestLen, const UTF8CHAR *Source, SourceEndType SourceEnd)
ARK_API int32 GetConvertedLength(const UTF8CHAR *, const UCS2CHAR *Source, int32 SourceLen)
ARK_API UCS2CHAR * Convert(UCS2CHAR *Dest, int32 DestLen, const UTF8CHAR *Src, int32 SrcLen)
ARK_API int32 GetConvertedLength(const ANSICHAR *, const UTF8CHAR *Source)
static FORCEINLINE bool IsLowSurrogate(const uint32 Codepoint)
static bool ReadTrailingOctet(uint32 &OutOctet, const UTF8CHAR *&Ptr, SourceEndType &SourceEnd)
ARK_API int32 GetConvertedLength(const UTF8CHAR *, const WIDECHAR *Source, int32 SourceLen)
void PopFront(Pointer &Ptr, int32 &Len)
ARK_API int32 GetConvertedLength(const UCS2CHAR *, const UTF8CHAR *Source, int32 SourceLen)
FORCEINLINE bool IsValidCodepoint(const uint32 Codepoint)
ARK_API WIDECHAR * Convert(WIDECHAR *Dest, int32 DestLen, const UTF8CHAR *Src, int32 SrcLen)
bool IsRangeEmpty(Pointer &Ptr, FNullTerminal)
ARK_API ANSICHAR * Convert(ANSICHAR *Dest, int32 DestLen, const UTF8CHAR *Src)
static FORCEINLINE bool IsSurrogate(const uint32 Codepoint)
bool IsRangeEmpty(Pointer &Ptr, int32 &Len)
ARK_API UTF8CHAR * Convert(UTF8CHAR *Dest, int32 DestLen, const UCS2CHAR *Src)
ARK_API int32 GetConvertedLength(const WIDECHAR *, const UTF8CHAR *Source, int32 SourceLen)
ARK_API UCS2CHAR * Convert(UCS2CHAR *Dest, int32 DestLen, const UTF8CHAR *Src)
ARK_API UTF8CHAR * Convert(UTF8CHAR *Dest, int32 DestLen, const UTF32CHAR *Src)
static FORCEINLINE void DecodeSurrogate(const uint32 Codepoint, uint16 &OutHighSurrogate, uint16 &OutLowSurrogate)
static bool WriteCodepointToBuffer(uint32 Codepoint, BufferType &OutputIterator, int32 &OutputIteratorByteSizeRemaining)
static uint32 CodepointFromUtf8(const UTF8CHAR *&SourceString, SourceEndType &SourceEnd)
void PopFront(Pointer &Ptr, FNullTerminal)
ARK_API UTF8CHAR * Convert(UTF8CHAR *Dest, int32 DestLen, const UCS2CHAR *Src, int32 SrcLen)
ARK_API int32 GetConvertedLength(const UTF8CHAR *, const WIDECHAR *Source)
static FORCEINLINE uint32 EncodeSurrogate(const uint16 HighSurrogate, const uint16 LowSurrogate)
void LogBogusCharsImpl(const SourceEncoding *Src, SourceEndType SourceEnd)
ARK_API int32 GetConvertedLength(const ANSICHAR *, const UTF8CHAR *Source, int32 SourceLen)
static int32 ConvertToUTF8(DestBufferType &Dest, int32 DestLen, const FromType *Source, SourceEndType SourceEnd)
Definition Vector.h:40
void TrimStringAndLogBogusCharsError(FString &SrcStr, const TCHAR *SourceCharName, const TCHAR *DestCharName)
static int32 Strncmp(const WIDECHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
static void LogBogusChars(const SourceEncoding *Src)
static const TCHAR * GetEncodingTypeName()
static int32 Strncmp(const ANSICHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
static int32 Strncmp(const ANSICHAR *String1, const WIDECHAR *String2, SIZE_T Count)
static int32 ConvertedLength(const SourceEncoding *Src, int32 SrcSize)
static constexpr bool CanConvertCodepoint(SourceEncoding Codepoint)
static constexpr bool IsCharEncodingSimplyConvertibleTo()
static int32 ConvertedLength(const SourceEncoding *Src)
static int32 Strncmp(const WIDECHAR *String1, const ANSICHAR *String2, SIZE_T Count)
static int32 Strncmp(const ANSICHAR *String1, const ANSICHAR *String2, SIZE_T Count)
static FORCEINLINE DestEncoding * Convert(DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src, int32 SrcSize)
static FORCEINLINE DestEncoding * Convert(DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src)
static int32 Strncmp(const UTF8CHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
static int32 Strncmp(const UTF8CHAR *String1, const ANSICHAR *String2, SIZE_T Count)
static int32 Strncmp(const UTF8CHAR *String1, const WIDECHAR *String2, SIZE_T Count)
static constexpr bool IsCharEncodingCompatibleWith()
static const ANSICHAR * GetEncodingName()
static void LogBogusChars(const SourceEncoding *Src, int32 SrcSize)
static int32 Strncmp(const WIDECHAR *String1, const WIDECHAR *String2, SIZE_T Count)
static constexpr bool IsUnicodeEncoded
static constexpr bool IsFixedWidthEncoding()
static void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
static FORCEINLINE void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
friend int32 operator-(TCountingOutputIterator Lhs, TCountingOutputIterator Rhs)
const DestType & operator=(const DestType &Val) const
const TCountingOutputIterator & operator+=(const int32 Amount)
const TCountingOutputIterator & operator++()
const TCountingOutputIterator & operator*() const
const TCountingOutputIterator & operator++(int)