UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UnrealString.h File Reference

Go to the source code of this file.

Classes

struct  TTypeToString< T >
 
struct  TTypeFromString< T >
 
struct  FTextRange
 

Namespaces

namespace  StringConv
 
namespace  UE
 
namespace  UE::Core
 
namespace  UE::Core::Private
 implementation
 

Macros

#define UE_STRING_CLASS   FString
 
#define UE_STRING_CHARTYPE   TCHAR
 
#define UE_STRING_CHARTYPE_IS_TCHAR   1
 
#define UE_STRING_PRINTF_FMT_CHARTYPE   TCHAR
 
#define UE_STRING_DEPRECATED(Version, Message)
 

Functions

FString BytesToString (const uint8 *In, int32 Count)
 
int32 StringToBytes (const FString &String, uint8 *OutBytes, int32 MaxBufferSize)
 
TCHAR NibbleToTChar (uint8 Num)
 
TCHAR NibbleToTCharLower (uint8 Num)
 
void ByteToHex (uint8 In, FString &Result)
 
FString BytesToHex (const uint8 *Bytes, int32 NumBytes)
 
FString BytesToHexLower (const uint8 *Bytes, int32 NumBytes)
 
const bool CheckTCharIsHex (const TCHAR Char)
 
const uint8 TCharToNibble (const TCHAR Hex)
 
template<typename StringType = FString, typename T >
StringType LexToString (const T &Value)
 
template<typename StringType = FString, typename CharType >
StringType LexToString (const CharType *Ptr)
 
template<typename StringType = FString>
StringType LexToString (bool Value)
 
template<typename StringType = FString, typename T >
StringType LexToSanitizedString (const T &Value)
 
template<typename StringType = FString>
StringType LexToSanitizedString (float Value)
 
template<typename StringType = FString>
StringType LexToSanitizedString (double Value)
 
CORE_API void StringConv::InlineCombineSurrogates (FString &Str)
 
UE_DISABLE_OPTIMIZATION_SHIP void UE::Core::Private::StripNegativeZero (double &InFloat)
 

Macro Definition Documentation

◆ UE_STRING_CHARTYPE

#define UE_STRING_CHARTYPE   TCHAR

◆ UE_STRING_CHARTYPE_IS_TCHAR

#define UE_STRING_CHARTYPE_IS_TCHAR   1

◆ UE_STRING_CLASS

#define UE_STRING_CLASS   FString

◆ UE_STRING_DEPRECATED

#define UE_STRING_DEPRECATED (   Version,
  Message 
)

◆ UE_STRING_PRINTF_FMT_CHARTYPE

#define UE_STRING_PRINTF_FMT_CHARTYPE   TCHAR

Function Documentation

◆ BytesToHex()

FString BytesToHex ( const uint8 Bytes,
int32  NumBytes 
)
inline

Convert bytes to uppercase hex string

◆ BytesToHexLower()

FString BytesToHexLower ( const uint8 Bytes,
int32  NumBytes 
)
inline

Convert bytes to lowercase hex string

◆ BytesToString()

FString BytesToString ( const uint8 In,
int32  Count 
)
inline

Convert an array of bytes to a string

Parameters
Inbyte array values to convert
Countnumber of bytes to convert
Returns
Valid string representing bytes.

◆ ByteToHex()

void ByteToHex ( uint8  In,
FString &  Result 
)
inline

Convert a byte to hex

Parameters
Inbyte value to convert
Resultout hex value output

◆ CheckTCharIsHex()

const bool CheckTCharIsHex ( const TCHAR  Char)
inline

Checks if the TChar is a valid hex character

Parameters
CharThe character
Returns
True if in 0-9 and A-F ranges

◆ LexToSanitizedString() [1/3]

template<typename StringType = FString, typename T >
StringType LexToSanitizedString ( const T &  Value)

Helper template to convert to sanitized strings

◆ LexToSanitizedString() [2/3]

template<typename StringType = FString>
StringType LexToSanitizedString ( double  Value)
inline

Overloaded for doubles

◆ LexToSanitizedString() [3/3]

template<typename StringType = FString>
StringType LexToSanitizedString ( float  Value)
inline

Overloaded for floats

◆ LexToString() [1/3]

template<typename StringType = FString>
StringType LexToString ( bool  Value)
inline

◆ LexToString() [2/3]

template<typename StringType = FString, typename CharType >
StringType LexToString ( const CharType *  Ptr)

◆ LexToString() [3/3]

template<typename StringType = FString, typename T >
StringType LexToString ( const T &  Value)

Convert numeric types to a string

◆ NibbleToTChar()

TCHAR NibbleToTChar ( uint8  Num)
inline

Returns uppercase Char value of Nibble

◆ NibbleToTCharLower()

TCHAR NibbleToTCharLower ( uint8  Num)
inline

Returns lowercase Char value of Nibble

◆ StringToBytes()

int32 StringToBytes ( const FString &  String,
uint8 OutBytes,
int32  MaxBufferSize 
)
inline

Convert FString of bytes into the byte array.

Parameters
StringThe FString of byte values
OutBytesPtr to memory must be preallocated large enough
MaxBufferSizeMax buffer size of the OutBytes array, to prevent overflow
Returns
The number of bytes copied

◆ TCharToNibble()

const uint8 TCharToNibble ( const TCHAR  Hex)
inline

Convert a TChar to equivalent hex value as a uint8

Parameters
HexThe character
Returns
The uint8 value of a hex character