#include <Text.h>
|
| static CORE_API FText | CreateFromBuffer (const TCHAR *Buffer, const TCHAR *TextNamespace=nullptr, const TCHAR *PackageNamespace=nullptr, const bool bRequiresQuotes=false) |
| |
| static CORE_API const TCHAR * | ReadFromBuffer (const TCHAR *Buffer, FText &OutValue, const TCHAR *TextNamespace=nullptr, const TCHAR *PackageNamespace=nullptr, const bool bRequiresQuotes=false) |
| |
| static CORE_API 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 CORE_API void | WriteToBuffer (FString &Buffer, const FText &Value, const bool bRequiresQuotes=false, const bool bStripPackageNamespace=false) |
| |
| static CORE_API bool | WriteToString (FString &Buffer, const FText &Value, const bool bRequiresQuotes=false) |
| |
| static CORE_API bool | IsComplexText (const TCHAR *Buffer) |
| |
◆ CreateFromBuffer()
| 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
-
| Buffer | The buffer of text to read from (null terminated). |
| TextNamespace | An optional namespace to use when parsing texts that use LOCTEXT (default is an empty namespace). |
| PackageNamespace | The package namespace of the containing object (if loading for a property - see TextNamespaceUtil::GetPackageNamespace). |
| bRequiresQuotes | True if the read text literal must be surrounded by quotes (eg, when loading from a delimited list). |
- Returns
- The parsed FText instance.
◆ IsComplexText()
| 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()
| 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
-
| Buffer | The buffer of text to read from (null terminated). |
| OutValue | The text value to fill with the read text. |
| TextNamespace | An optional namespace to use when parsing texts that use LOCTEXT (default is an empty namespace). |
| PackageNamespace | The package namespace of the containing object (if loading for a property - see TextNamespaceUtil::GetPackageNamespace). |
| bRequiresQuotes | True 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
◆ ReadFromString()
◆ WriteToBuffer()
| 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
-
| Buffer | The buffer of text to write to. |
| Value | The text value to write into the buffer. |
| bRequiresQuotes | True if the written text literal must be surrounded by quotes (eg, when saving as a delimited list) |
| bStripPackageNamespace | True to strip the package namespace from the written NSLOCTEXT value (eg, when saving cooked data) |
◆ WriteToString()
| bool FTextStringHelper::WriteToString |
( |
FString & |
Buffer, |
|
|
const FText & |
Value, |
|
|
const bool |
bRequiresQuotes = false |
|
) |
| |
|
static |
The documentation for this class was generated from the following files:
- Engine/Source/Runtime/Core/Public/Internationalization/Text.h
- Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp