PluginsUDCoreFeaturesFunction Library
Text Functions
FText validation and manipulation utilities
The UUDCoreTextFunctionLibrary provides utilities for working with Unreal's FText type.
FText is Unreal Engine's localization-friendly text type. Use it for any user-facing text that may need translation.
Validation Functions
IsNotEmpty
Checks if an FText value contains any content (is not empty).
This is the inverse of the built-in IsEmpty function, provided for cleaner Blueprint logic.
Search for "Is Not Empty" (under Text category) in the Blueprint action menu.
FText TextToCheck = FText::FromString(TEXT("Hello"));
bool bHasContent = UUDCoreTextFunctionLibrary::IsNotEmpty(TextToCheck);
// Result: true
FText EmptyText = FText::GetEmpty();
bool bIsEmpty = UUDCoreTextFunctionLibrary::IsNotEmpty(EmptyText);
// Result: falseParameters
| Name | Type | Description |
|---|---|---|
Text | FText | The text to check |
Returns
| Name | Type | Description |
|---|---|---|
ReturnValue | bool | true if the text is not empty |
Use Cases
Input Validation
// Validate that user entered something
FText UserInput = GetUserInput();
if (UUDCoreTextFunctionLibrary::IsNotEmpty(UserInput))
{
// Process the input
ProcessInput(UserInput);
}
else
{
// Show error message
ShowError(TEXT("Please enter a value"));
}Conditional Display
In Blueprints, you can use this to conditionally show UI elements:
- Get your FText value
- Call Is Not Empty
- Branch based on the result
- Show/hide UI elements accordingly
Summary
| Function | Description |
|---|---|
IsNotEmpty | Check if FText has content (not empty) |
More text utility functions may be added in future versions. Check the Changelog for updates.