RealDocs

UKismetStringLibrary::Len

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

Description

Returns the number of characters in the string. Backs the Blueprint "Length" node (compact title LEN).

Caveats & Gotchas

  • Counts UTF-16 code units (TCHARs), not visible glyphs, so combining characters or surrogate-pair Unicode text can report more than one "character" per glyph.
  • An empty string returns 0; use IsEmpty for clearer intent when only checking for emptiness.

Signature

static int32 Len(const FString& S)

Parameters

Name Type Description Default
S const FString& The string to measure.

Return Type

int32

Example

Check a string's length C++
if (UKismetStringLibrary::Len(PlayerName) > 20)
{
    TruncateName();
}

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.