Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FTextStringHelper Class Reference

#include <Text.h>

Static Public Member Functions

static FText CreateFromBuffer (const TCHAR *Buffer, const TCHAR *TextNamespace=nullptr, const TCHAR *PackageNamespace=nullptr, const bool bRequiresQuotes=false)
 
static const TCHAR * ReadFromBuffer (const TCHAR *Buffer, FText &OutValue, const TCHAR *TextNamespace=nullptr, const TCHAR *PackageNamespace=nullptr, const bool bRequiresQuotes=false)
 
static bool ReadFromString (const TCHAR *Buffer, FText &OutValue, const TCHAR *TextNamespace=nullptr, const TCHAR *PackageNamespace=nullptr, int32 *OutNumCharsRead=nullptr, const bool bRequiresQuotes=false, const EStringTableLoadingPolicy InLoadingPolicy=EStringTableLoadingPolicy::FindOrLoad)
 
static void WriteToBuffer (FString &Buffer, const FText &Value, const bool bRequiresQuotes=false, const bool bStripPackageNamespace=false)
 
static bool WriteToString (FString &Buffer, const FText &Value, const bool bRequiresQuotes=false)
 
static bool IsComplexText (const TCHAR *Buffer)
 

Static Private Member Functions

static const TCHAR * ReadFromBuffer_ComplexText (const TCHAR *Buffer, FText &OutValue, const TCHAR *TextNamespace, const TCHAR *PackageNamespace)
 

Detailed Description

Definition at line 1147 of file Text.h.

Member Function Documentation

◆ CreateFromBuffer()

static FText FTextStringHelper::CreateFromBuffer ( const TCHAR * Buffer,
const TCHAR * TextNamespace = nullptr,
const TCHAR * PackageNamespace = nullptr,
const bool bRequiresQuotes = false )
static

Create an FText instance from the given stream of text.

Note
This uses ReadFromBuffer internally, but will fallback to FText::FromString if ReadFromBuffer fails to parse the buffer.
Parameters
BufferThe buffer of text to read from (null terminated).
TextNamespaceAn optional namespace to use when parsing texts that use LOCTEXT (default is an empty namespace).
PackageNamespaceThe package namespace of the containing object (if loading for a property - see TextNamespaceUtil::GetPackageNamespace).
bRequiresQuotesTrue if the read text literal must be surrounded by quotes (eg, when loading from a delimited list).
Returns
The parsed FText instance.

◆ IsComplexText()

static bool FTextStringHelper::IsComplexText ( const TCHAR * Buffer)
static

Test to see whether a given buffer contains complex text.

Returns
True if it does, false otherwise

◆ ReadFromBuffer()

static const TCHAR * FTextStringHelper::ReadFromBuffer ( const TCHAR * Buffer,
FText & OutValue,
const TCHAR * TextNamespace = nullptr,
const TCHAR * PackageNamespace = nullptr,
const bool bRequiresQuotes = false )
static

Attempt to extract an FText instance from the given stream of text.

Parameters
BufferThe buffer of text to read from (null terminated).
OutValueThe text value to fill with the read text.
TextNamespaceAn optional namespace to use when parsing texts that use LOCTEXT (default is an empty namespace).
PackageNamespaceThe package namespace of the containing object (if loading for a property - see TextNamespaceUtil::GetPackageNamespace).
bRequiresQuotesTrue if the read text literal must be surrounded by quotes (eg, when loading from a delimited list).
Returns
The updated buffer after we parsed this text, or nullptr on failure

◆ ReadFromBuffer_ComplexText()

static const TCHAR * FTextStringHelper::ReadFromBuffer_ComplexText ( const TCHAR * Buffer,
FText & OutValue,
const TCHAR * TextNamespace,
const TCHAR * PackageNamespace )
staticprivate

◆ ReadFromString()

static bool FTextStringHelper::ReadFromString ( const TCHAR * Buffer,
FText & OutValue,
const TCHAR * TextNamespace = nullptr,
const TCHAR * PackageNamespace = nullptr,
int32 * OutNumCharsRead = nullptr,
const bool bRequiresQuotes = false,
const EStringTableLoadingPolicy InLoadingPolicy = EStringTableLoadingPolicy::FindOrLoad )
static

◆ WriteToBuffer()

static void FTextStringHelper::WriteToBuffer ( FString & Buffer,
const FText & Value,
const bool bRequiresQuotes = false,
const bool bStripPackageNamespace = false )
static

Write the given FText instance to a stream of text

Parameters
BufferThe buffer of text to write to.
ValueThe text value to write into the buffer.
bRequiresQuotesTrue if the written text literal must be surrounded by quotes (eg, when saving as a delimited list)
bStripPackageNamespaceTrue to strip the package namespace from the written NSLOCTEXT value (eg, when saving cooked data)

◆ WriteToString()

static bool FTextStringHelper::WriteToString ( FString & Buffer,
const FText & Value,
const bool bRequiresQuotes = false )
static

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