#include <GenericPlatformString.h>
|
template<typename Encoding > |
static bool | IsValidChar (Encoding Ch) |
|
template<typename DestEncoding , typename SourceEncoding > |
static bool | CanConvertChar (SourceEncoding Ch) |
|
template<typename Encoding > |
static const TCHAR * | GetEncodingTypeName () |
|
template<typename SourceEncoding , typename DestEncoding > |
static TEnableIf< TAreEncodingsCompatible< SourceEncoding, DestEncoding >::Value, DestEncoding * >::Type | Convert (DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src, int32 SrcSize, DestEncoding BogusChar=(DestEncoding)'?') |
|
template<typename SourceEncoding , typename DestEncoding > |
static TEnableIf<!TAreEncodingsCompatible< SourceEncoding, DestEncoding >::Value &&TIsFixedWidthEncoding< SourceEncoding >::Value, DestEncoding * >::Type | Convert (DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src, int32 SrcSize, DestEncoding BogusChar=(DestEncoding)'?') |
|
template<typename DestEncoding , typename SourceEncoding > |
static TEnableIf< TIsFixedWidthEncoding< SourceEncoding >::Value &&TIsFixedWidthEncoding< DestEncoding >::Value, int32 >::Type | ConvertedLength (const SourceEncoding *Src, int32 SrcSize) |
|
template<> |
bool | IsValidChar (ANSICHAR Ch) |
|
template<> |
const TCHAR * | GetEncodingTypeName () |
|
template<> |
const TCHAR * | GetEncodingTypeName () |
|
template<> |
const TCHAR * | GetEncodingTypeName () |
|
|
static void * | Memcpy (void *Dest, const void *Src, SIZE_T Count) |
|
Generic string implementation for most platforms
Definition at line 12 of file GenericPlatformString.h.
◆ CanConvertChar()
template<typename DestEncoding , typename SourceEncoding >
static bool FGenericPlatformString::CanConvertChar |
( |
SourceEncoding | Ch | ) |
|
|
inlinestatic |
Tests whether a particular character can be converted to the destination encoding.
- Parameters
-
- Returns
- True if Ch can be encoded as a DestEncoding.
Definition at line 34 of file GenericPlatformString.h.
◆ Convert() [1/2]
template<typename SourceEncoding , typename DestEncoding >
static TEnableIf< TAreEncodingsCompatible< SourceEncoding, DestEncoding >::Value, DestEncoding * >::Type FGenericPlatformString::Convert |
( |
DestEncoding * | Dest, |
|
|
int32 | DestSize, |
|
|
const SourceEncoding * | Src, |
|
|
int32 | SrcSize, |
|
|
DestEncoding | BogusChar = (DestEncoding)'?' ) |
|
inlinestatic |
Converts the [Src, Src+SrcSize) string range from SourceChar to DestChar and writes it to the [Dest, Dest+DestSize) range. The Src range should contain a null terminator if a null terminator is required in the output. 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.
- Parameters
-
Dest | The start of the destination buffer. |
DestSize | The size of the destination buffer. |
Src | The start of the string to convert. |
SrcSize | The number of Src elements to convert. |
BogusChar | The char to use when the conversion process encounters a character it cannot convert. |
- Returns
- A pointer to one past the last-written element.
Definition at line 108 of file GenericPlatformString.h.
◆ Convert() [2/2]
template<typename SourceEncoding , typename DestEncoding >
Converts the [Src, Src+SrcSize) string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range. The Src range should contain a null terminator if a null terminator is required in the output. 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.
- Parameters
-
Dest | The start of the destination buffer. |
DestSize | The size of the destination buffer. |
Src | The start of the string to convert. |
SrcSize | The number of Src elements to convert. |
BogusChar | The char to use when the conversion process encounters a character it cannot convert. |
- Returns
- A pointer to one past the last-written element.
Definition at line 133 of file GenericPlatformString.h.
◆ ConvertedLength()
template<typename DestEncoding , typename SourceEncoding >
Returns the required buffer length for the [Src, Src+SrcSize) string when converted to the DestChar encoding. The Src range should contain a null terminator if a null terminator is required in the output.
- Parameters
-
Src | The start of the string to convert. |
SrcSize | The number of Src elements to convert. |
- Returns
- The number of DestChar elements that Src will be converted into.
Definition at line 169 of file GenericPlatformString.h.
◆ GetEncodingTypeName() [1/4]
template<typename Encoding >
static const TCHAR * FGenericPlatformString::GetEncodingTypeName |
( |
| ) |
|
|
static |
Returns the string representing the name of the given encoding type.
- Returns
- The name of the CharType as a TCHAR string.
◆ GetEncodingTypeName() [2/4]
template<>
const TCHAR * FGenericPlatformString::GetEncodingTypeName |
( |
| ) |
|
|
inlinestatic |
◆ GetEncodingTypeName() [3/4]
template<>
const TCHAR * FGenericPlatformString::GetEncodingTypeName |
( |
| ) |
|
|
inlinestatic |
◆ GetEncodingTypeName() [4/4]
template<>
const TCHAR * FGenericPlatformString::GetEncodingTypeName |
( |
| ) |
|
|
inlinestatic |
◆ IsValidChar() [1/2]
template<>
bool FGenericPlatformString::IsValidChar |
( |
ANSICHAR | Ch | ) |
|
|
inlinestatic |
◆ IsValidChar() [2/2]
template<typename Encoding >
static bool FGenericPlatformString::IsValidChar |
( |
Encoding | Ch | ) |
|
|
inlinestatic |
Tests whether a particular character is a valid member of its encoding.
- Parameters
-
- Returns
- True if the character is a valid member of Encoding.
Definition at line 21 of file GenericPlatformString.h.
◆ Memcpy()
void * FGenericPlatformString::Memcpy |
( |
void * | Dest, |
|
|
const void * | Src, |
|
|
SIZE_T | Count ) |
|
inlinestaticprivate |
Forwarding function because we can't call FMemory::Memcpy directly due to #include ordering issues.
- Parameters
-
Dest | The destination buffer. |
Src | The source buffer. |
Count | The number of bytes to copy. |
- Returns
- Dest
Definition at line 205 of file GenericPlatformString.h.
◆ IsUnicodeEncoded
const bool FGenericPlatformString::IsUnicodeEncoded = false |
|
static |
The documentation for this struct was generated from the following file:
- C:/Users/lachl/Downloads/ArkServerAPI_NEW/ASE/AseApi-main/version/Core/Public/API/UE/GenericPlatform/GenericPlatformString.h