![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Use leading TEXT_
without parenthesis for Unreal compatible text literals.
More...
Go to the source code of this file.
Namespaces | |
namespace | Mcro |
namespace | Mcro::Text |
Mixed text utilities and type traits. | |
namespace | Mcro::Text::Macros |
This namespace is used by MCRO text literal macros, don't use it directly! | |
Macros | |
#define | UTF8TEXT_PASTE_ u8"" |
#define | UTF16TEXT_PASTE_ u"" |
#define | WIDETEXT_PASTE_ L"" |
#define | UTF8TEXT_ UTF8TEXT_PASTE_ |
#define | UTF16TEXT_ UTF16TEXT_PASTE_ |
#define | WIDETEXT_ WIDETEXT_PASTE_ |
#define | TEXT_PASTE_ WIDETEXT_ |
#define | TEXT_ TEXT_PASTE_ |
A convenience alternative to Unreal's own TEXT macro but this one doesn't require parenthesis around the text literal, relying on string literal concatenation rules of C++. | |
#define | LOCTEXT_(key) |
A convenience alternative to Unreal's own LOCTEXT macro but this one doesn't require parenthesis around the text literal. | |
#define | NSLOCTEXT_(ns, key) |
A convenience alternative to Unreal's own NSLOCTEXT macro but this one doesn't require parenthesis around the text literal. | |
#define | INVTEXT_ Mcro::Text::Macros::FInvTextFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own INVTEXT macro but this one doesn't require parenthesis around the text literal. | |
#define | TEXTVIEW_ Mcro::Text::Macros::FStringViewFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW macro but this one doesn't require parenthesis around the text literal. | |
#define | STDVIEW_ Mcro::Text::Macros::FStdStringLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW macro but this one doesn't require parenthesis around the text literal and it returns an STL string view. | |
#define | STRING_ Mcro::Text::Macros::FStringFakeLiteralTag() % TEXT_ |
A convenience macro to allocate an FString directly. | |
#define | NAME_ Mcro::Text::Macros::FNameFakeLiteralTag() % TEXT_ |
A convenience macro to allocate an FName directly. | |
#define | _PRINTF(...) |
Trailing fake text literal which shortens down the FString::Printf(TEXT("..."), ...); expression. | |
#define | PRINTF_(...) |
Leading fake text literal which shortens down the FString::Printf(TEXT("..."), ...); expression. | |
Functions | |
FORCEINLINE FText | Mcro::Text::Macros::AsLocalizable_Advanced (const FTextKey &Namespace, const FTextKey &Key, const TCHAR *String) |
template<typename... Args> | |
TStringPrintfLiteral< Args... > | Mcro::Text::Macros::MakePrintfLiteral (Args &&... args) |
Use leading TEXT_
without parenthesis for Unreal compatible text literals.
Definition in file TextMacros.h.
#define _PRINTF | ( | ... | ) |
Trailing fake text literal which shortens down the FString::Printf(TEXT("..."), ...);
expression.
Usage:
This operation runs FString::Printf
in runtime and allocates a struct which stores the format arguments (preserving CV-ref qualifiers).
Definition at line 245 of file TextMacros.h.
#define INVTEXT_ Mcro::Text::Macros::FInvTextFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own INVTEXT
macro but this one doesn't require parenthesis around the text literal.
This operation allocates FText in runtime and an empty tag struct
Definition at line 190 of file TextMacros.h.
#define LOCTEXT_ | ( | key | ) |
A convenience alternative to Unreal's own LOCTEXT
macro but this one doesn't require parenthesis around the text literal.
This operation allocates an argument deferring struct and FText in runtime
Definition at line 170 of file TextMacros.h.
#define NAME_ Mcro::Text::Macros::FNameFakeLiteralTag() % TEXT_ |
A convenience macro to allocate an FName directly.
This operation allocates FName in runtime and an empty tag struct. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 229 of file TextMacros.h.
#define NSLOCTEXT_ | ( | ns, | |
key ) |
A convenience alternative to Unreal's own NSLOCTEXT
macro but this one doesn't require parenthesis around the text literal.
This operation allocates an argument deferring struct and FText in runtime
Definition at line 180 of file TextMacros.h.
#define PRINTF_ | ( | ... | ) |
Leading fake text literal which shortens down the FString::Printf(TEXT("..."), ...);
expression.
Usage:
This operation runs FString::Printf
in runtime and allocates a struct which stores the format arguments (preserving CV-ref qualifiers).
Definition at line 261 of file TextMacros.h.
#define STDVIEW_ Mcro::Text::Macros::FStdStringLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW
macro but this one doesn't require parenthesis around the text literal and it returns an STL string view.
This operation creates a std::[w]string_view
in consteval time. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 211 of file TextMacros.h.
#define STRING_ Mcro::Text::Macros::FStringFakeLiteralTag() % TEXT_ |
A convenience macro to allocate an FString directly.
This operation allocates FString in runtime and an empty tag struct. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 220 of file TextMacros.h.
#define TEXT_ TEXT_PASTE_ |
A convenience alternative to Unreal's own TEXT
macro but this one doesn't require parenthesis around the text literal, relying on string literal concatenation rules of C++.
This operation is resolved entirely in compile time
Definition at line 51 of file TextMacros.h.
#define TEXT_PASTE_ WIDETEXT_ |
Definition at line 41 of file TextMacros.h.
#define TEXTVIEW_ Mcro::Text::Macros::FStringViewFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW
macro but this one doesn't require parenthesis around the text literal.
This operation creates an FStringView in consteval time. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 201 of file TextMacros.h.
#define UTF16TEXT_ UTF16TEXT_PASTE_ |
Definition at line 35 of file TextMacros.h.
#define UTF16TEXT_PASTE_ u"" |
Definition at line 26 of file TextMacros.h.
#define UTF8TEXT_ UTF8TEXT_PASTE_ |
Definition at line 34 of file TextMacros.h.
#define UTF8TEXT_PASTE_ u8"" |
Definition at line 25 of file TextMacros.h.
#define WIDETEXT_ WIDETEXT_PASTE_ |
Definition at line 36 of file TextMacros.h.
#define WIDETEXT_PASTE_ L"" |
Definition at line 31 of file TextMacros.h.