RealDocs

UKismetStringLibrary::IsEmpty

function Engine Blueprint Since unknown
#include "Kismet/KismetStringLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns true if the string is empty (zero length).

Caveats & Gotchas

  • A string containing only whitespace (e.g. " ") is not considered empty; Trim it first if whitespace-only strings should count as empty.
  • Equivalent to, but more readable in a graph than, checking Len(InString) == 0.

Signature

static bool IsEmpty(const FString& InString)

Parameters

Name Type Description Default
InString const FString& The string to check.

Return Type

bool

Example

Guard against an unset name C++
if (UKismetStringLibrary::IsEmpty(PlayerName))
{
    PlayerName = TEXT("Unnamed");
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.