UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGenericPlatformString Struct Reference

#include <GenericPlatformString.h>

+ Inheritance diagram for FGenericPlatformString:

Static Public Member Functions

template<typename DestEncoding , typename SourceEncoding >
static constexpr bool CanConvertCodepoint (SourceEncoding Codepoint)
 
template<typename Encoding >
static const TCHARGetEncodingTypeName ()
 
static const ANSICHARGetEncodingName ()
 
template<typename SourceEncoding , typename DestEncoding >
static DestEncodingConvert (DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src)
 
template<typename SourceEncoding , typename DestEncoding >
static DestEncodingConvert (DestEncoding *Dest, int32 DestSize, const SourceEncoding *Src, int32 SrcSize)
 
template<typename DestEncoding , typename SourceEncoding >
static int32 ConvertedLength (const SourceEncoding *Src)
 
template<typename DestEncoding , typename SourceEncoding >
static int32 ConvertedLength (const SourceEncoding *Src, int32 SrcSize)
 
static CORE_API int32 Strncmp (const ANSICHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const WIDECHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const UTF8CHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const ANSICHAR *String1, const WIDECHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const WIDECHAR *String1, const WIDECHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const UTF8CHAR *String1, const WIDECHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const ANSICHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const WIDECHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strncmp (const UTF8CHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
 
template<>
const TCHARGetEncodingTypeName ()
 
template<>
const TCHARGetEncodingTypeName ()
 
template<>
const TCHARGetEncodingTypeName ()
 
template<>
const TCHARGetEncodingTypeName ()
 
- Static Public Member Functions inherited from FGenericPlatformStricmp
static CORE_API int32 Stricmp (const ANSICHAR *String1, const ANSICHAR *String2)
 
static CORE_API int32 Stricmp (const WIDECHAR *String1, const WIDECHAR *String2)
 
static CORE_API int32 Stricmp (const UTF8CHAR *String1, const UTF8CHAR *String2)
 
static CORE_API int32 Stricmp (const UTF16CHAR *String1, const UTF16CHAR *String2)
 
static CORE_API int32 Stricmp (const UTF32CHAR *String1, const UTF32CHAR *String2)
 
static CORE_API int32 Stricmp (const ANSICHAR *String1, const WIDECHAR *String2)
 
static CORE_API int32 Stricmp (const ANSICHAR *String1, const UTF8CHAR *String2)
 
static CORE_API int32 Stricmp (const ANSICHAR *String1, const UTF16CHAR *String2)
 
static CORE_API int32 Stricmp (const ANSICHAR *String1, const UTF32CHAR *String2)
 
static CORE_API int32 Stricmp (const WIDECHAR *String1, const ANSICHAR *String2)
 
static CORE_API int32 Stricmp (const UTF8CHAR *String1, const ANSICHAR *String2)
 
static CORE_API int32 Stricmp (const UTF16CHAR *String1, const ANSICHAR *String2)
 
static CORE_API int32 Stricmp (const UTF32CHAR *String1, const ANSICHAR *String2)
 
static CORE_API int32 Strnicmp (const ANSICHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const WIDECHAR *String1, const WIDECHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const UTF8CHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const UTF16CHAR *String1, const UTF16CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const UTF32CHAR *String1, const UTF32CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const ANSICHAR *String1, const WIDECHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const ANSICHAR *String1, const UTF8CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const ANSICHAR *String1, const UTF16CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const ANSICHAR *String1, const UTF32CHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const WIDECHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const UTF8CHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const UTF16CHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 
static CORE_API int32 Strnicmp (const UTF32CHAR *String1, const ANSICHAR *String2, SIZE_T Count)
 

Static Public Attributes

static constexpr bool IsUnicodeEncoded = true
 

Detailed Description

Generic string implementation for most platforms

Member Function Documentation

◆ CanConvertCodepoint()

static constexpr bool FGenericPlatformString::CanConvertCodepoint ( SourceEncoding  Codepoint)
inlinestaticconstexpr

Tests whether a particular codepoint can be converted to the destination encoding.

Parameters
ChThe character to test.
Returns
True if Ch can be encoded as a DestEncoding.

◆ Convert() [1/2]

static DestEncoding * FGenericPlatformString::Convert ( DestEncoding Dest,
int32  DestSize,
const SourceEncoding Src 
)
inlinestatic

Converts the null-terminated Src string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range, including a null terminator. 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
DestThe start of the destination buffer.
DestSizeThe size of the destination buffer.
SrcThe start of the string to convert.
Returns
A pointer to one past the last-written element.

◆ Convert() [2/2]

static DestEncoding * FGenericPlatformString::Convert ( DestEncoding Dest,
int32  DestSize,
const SourceEncoding Src,
int32  SrcSize 
)
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.

Parameters
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.
Returns
A pointer to one past the last-written element.

◆ ConvertedLength() [1/2]

static int32 FGenericPlatformString::ConvertedLength ( const SourceEncoding Src)
inlinestatic

Returns the required buffer length for the null-terminated Src string when converted to the DestChar encoding. The returned length includes the space for the null terminator (equivalent to strlen+1).

Parameters
SrcThe start of the string to convert.
Returns
The number of DestChar elements that Src will be converted into.

◆ ConvertedLength() [2/2]

static int32 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.

Parameters
SrcThe start of the string to convert.
SrcSizeThe number of Src elements to convert.
Returns
The number of DestChar elements that Src will be converted into.

◆ GetEncodingName()

static const ANSICHAR * FGenericPlatformString::GetEncodingName ( )
inlinestatic

◆ GetEncodingTypeName() [1/5]

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

◆ GetEncodingTypeName() [2/5]

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

◆ GetEncodingTypeName() [3/5]

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

◆ GetEncodingTypeName() [4/5]

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

◆ GetEncodingTypeName() [5/5]

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.

◆ Strncmp() [1/9]

int32 FGenericPlatformString::Strncmp ( const ANSICHAR String1,
const ANSICHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [2/9]

int32 FGenericPlatformString::Strncmp ( const ANSICHAR String1,
const UTF8CHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [3/9]

int32 FGenericPlatformString::Strncmp ( const ANSICHAR String1,
const WIDECHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [4/9]

int32 FGenericPlatformString::Strncmp ( const UTF8CHAR String1,
const ANSICHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [5/9]

int32 FGenericPlatformString::Strncmp ( const UTF8CHAR String1,
const UTF8CHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [6/9]

int32 FGenericPlatformString::Strncmp ( const UTF8CHAR String1,
const WIDECHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [7/9]

int32 FGenericPlatformString::Strncmp ( const WIDECHAR String1,
const ANSICHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [8/9]

int32 FGenericPlatformString::Strncmp ( const WIDECHAR String1,
const UTF8CHAR String2,
SIZE_T  Count 
)
static

◆ Strncmp() [9/9]

int32 FGenericPlatformString::Strncmp ( const WIDECHAR String1,
const WIDECHAR String2,
SIZE_T  Count 
)
static

Member Data Documentation

◆ IsUnicodeEncoded

constexpr bool FGenericPlatformString::IsUnicodeEncoded = true
staticconstexpr

True if the encoding type of the string is some form of unicode


The documentation for this struct was generated from the following files: