Unreal Directive Docs
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: false

Parameters

NameTypeDescription
TextFTextThe text to check

Returns

NameTypeDescription
ReturnValuebooltrue 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:

  1. Get your FText value
  2. Call Is Not Empty
  3. Branch based on the result
  4. Show/hide UI elements accordingly

Summary

FunctionDescription
IsNotEmptyCheck if FText has content (not empty)

More text utility functions may be added in future versions. Check the Changelog for updates.

On this page