engine
 
载入中...
搜索中...
未找到
类 | 静态 Public 成员函数 | 静态 Public 属性 | 所有成员列表
FGenericPlatformString结构体 参考

Generic string implementation for most platforms 更多...

#include <GenericPlatformString.h>

+ 类 FGenericPlatformString 继承关系图:

类

struct  TAreEncodingsCompatible
 Metafunction which tests whether two encodings are compatible. 更多...
 
struct  TIsFixedWidthEncoding_Helper
 Metafunction which tests whether a given character type represents a fixed-width encoding. 更多...
 

静态 Public 成员函数

template<typename DestEncoding , typename SourceEncoding >
static bool CanConvertChar (SourceEncoding Ch)
 Tests whether a particular character can be converted to the destination encoding. 更多...
 
template<typename SourceEncoding , typename DestEncoding >
static FORCEINLINE TEnableIf< TAreEncodingsCompatible< SourceEncoding, DestEncoding >::Value, DestEncoding * >::Type Convert (DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src, int32 SrcSize, DestEncoding BogusChar=(DestEncoding)'?')
 Converts the [Src, Src+SrcSize) string range from SourceChar to DestChar and writes it to the [Dest, Dest+DestSize) range. 更多...
 
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)'?')
 Converts the [Src, Src+SrcSize) string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range. 更多...
 
template<typename DestEncoding , typename SourceEncoding >
static TEnableIf< TIsFixedWidthEncoding< SourceEncoding >::Value &&TIsFixedWidthEncoding< DestEncoding >::Value, int32 >::Type ConvertedLength (const SourceEncoding *Src, int32 SrcSize)
 Returns the required buffer length for the [Src, Src+SrcSize) string when converted to the DestChar encoding. 更多...
 
template<typename Encoding >
static const TCHAR * GetEncodingTypeName ()
 Returns the string representing the name of the given encoding type. 更多...
 
template<>
bool IsValidChar (ANSICHAR Ch)
 Specialization of IsValidChar for ANSICHARs.
 
template<typename Encoding >
static bool IsValidChar (Encoding Ch)
 Tests whether a particular character is a valid member of its encoding. 更多...
 

静态 Public 属性

static const bool IsUnicodeEncoded = true
 True if the encoding type of the string is some form of unicode
 

详细描述

Generic string implementation for most platforms

成员函数说明

◆ 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.

参数
ChThe character to test.
返回
True if Ch can be encoded as a DestEncoding.

◆ Convert() [1/2]

template<typename SourceEncoding , typename DestEncoding >
static FORCEINLINE 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.

参数
DestThe start of the destination buffer.
DestSizeThe size of the destination buffer.
SrcThe start of the string to convert.
SrcSizeThe number of Src elements to convert.
BogusCharThe char to use when the conversion process encounters a character it cannot convert.
返回
A pointer to one past the last-written element.

◆ Convert() [2/2]

template<typename SourceEncoding , typename DestEncoding >
static TEnableIf<!TAreEncodingsCompatible< SourceEncoding, DestEncoding >::Value &&TIsFixedWidthEncoding< SourceEncoding >::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 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.

参数
DestThe start of the destination buffer.
DestSizeThe size of the destination buffer.
SrcThe start of the string to convert.
SrcSizeThe number of Src elements to convert.
BogusCharThe char to use when the conversion process encounters a character it cannot convert.
返回
A pointer to one past the last-written element.

◆ ConvertedLength()

template<typename DestEncoding , typename SourceEncoding >
static TEnableIf< TIsFixedWidthEncoding< SourceEncoding >::Value &&TIsFixedWidthEncoding< DestEncoding >::Value, int32 >::Type FGenericPlatformString::ConvertedLength ( const SourceEncoding *  Src,
int32  SrcSize 
)
inlinestatic

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.

参数
SrcThe start of the string to convert.
SrcSizeThe number of Src elements to convert.
返回
The number of DestChar elements that Src will be converted into.

◆ GetEncodingTypeName()

template<typename Encoding >
static const TCHAR * FGenericPlatformString::GetEncodingTypeName ( )
static

Returns the string representing the name of the given encoding type.

返回
The name of the CharType as a TCHAR string.

◆ IsValidChar()

template<typename Encoding >
static bool FGenericPlatformString::IsValidChar ( Encoding  Ch)
inlinestatic

Tests whether a particular character is a valid member of its encoding.

参数
ChThe character to test.
返回
True if the character is a valid member of Encoding.

该结构体的文档由以下文件生成: