UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TStringPointer< InFromType, InToType > Class Template Reference

#include <StringConv.h>

Public Types

typedef InFromType FromType
 
typedef InToType ToType
 

Public Member Functions

template<typename SrcBufferType >
 TStringPointer (const SrcBufferType *Source)
 
template<typename SrcBufferType >
 TStringPointer (const SrcBufferType *Source, int32 SourceLen)
 
 TStringPointer (UE::Core::Private::FFromStrCast, const FromType *Source, int32 SourceLen)
 
template<typename FromRangeType , typename FromRangeCharType = std::remove_cv_t<std::remove_pointer_t<decltype(GetData(std::declval<FromRangeType>()))>, UE_REQUIRES( TIsContiguousContainer< FromRangeType >::Value && !TIsArray< std::remove_reference_t< FromRangeType > >::Value && TIsCharEncodingCompatibleWith< FromRangeCharType, FromType >::Value) >
 TStringPointer (FromRangeType &&Source)
 
 TStringPointer (TStringPointer &&Other)=default
 
UE_FORCEINLINE_HINT const ToTypeGet () const UE_LIFETIMEBOUND
 
UE_FORCEINLINE_HINT int32 Length () const
 

Detailed Description

template<typename InFromType, typename InToType = InFromType>
class TStringPointer< InFromType, InToType >

Class takes one type of string and and stores it as-is. For API compatibility with TStringConversion when the To and From types are already in the same format.

Member Typedef Documentation

◆ FromType

◆ ToType

Constructor & Destructor Documentation

◆ TStringPointer() [1/5]

template<typename InFromType , typename InToType = InFromType>
template<typename SrcBufferType >
TStringPointer< InFromType, InToType >::TStringPointer ( const SrcBufferType Source)
inlineexplicit

◆ TStringPointer() [2/5]

template<typename InFromType , typename InToType = InFromType>
template<typename SrcBufferType >
TStringPointer< InFromType, InToType >::TStringPointer ( const SrcBufferType Source,
int32  SourceLen 
)
inlineexplicit

◆ TStringPointer() [3/5]

template<typename InFromType , typename InToType = InFromType>
TStringPointer< InFromType, InToType >::TStringPointer ( UE::Core::Private::FFromStrCast  ,
const FromType Source,
int32  SourceLen 
)
inlineexplicit

◆ TStringPointer() [4/5]

template<typename InFromType , typename InToType = InFromType>
template<typename FromRangeType , typename FromRangeCharType = std::remove_cv_t<std::remove_pointer_t<decltype(GetData(std::declval<FromRangeType>()))>, UE_REQUIRES( TIsContiguousContainer< FromRangeType >::Value && !TIsArray< std::remove_reference_t< FromRangeType > >::Value && TIsCharEncodingCompatibleWith< FromRangeCharType, FromType >::Value) >
TStringPointer< InFromType, InToType >::TStringPointer ( FromRangeType &&  Source)
inline

Construct from a compatible character range such as TStringView or TStringBuilder.

◆ TStringPointer() [5/5]

Move constructor

Member Function Documentation

◆ Get()

template<typename InFromType , typename InToType = InFromType>
UE_FORCEINLINE_HINT const ToType * TStringPointer< InFromType, InToType >::Get ( ) const
inline

Accessor for the string.

Note
The string may not be null-terminated if constructed from an explicitly sized buffer that didn't include the null-terminator.
Setting to UE_LIFETIMEBOUND even though TStringPointer doesn't own the pointer, because we want StringCast to give consistent warnings no matter what implementation choice it makes
Returns
A const pointer to the string.

◆ Length()

template<typename InFromType , typename InToType = InFromType>
UE_FORCEINLINE_HINT int32 TStringPointer< InFromType, InToType >::Length ( ) const
inline

Length of the string.

Returns
The number of characters in the string, excluding any null terminator.

The documentation for this class was generated from the following file: