RealDocs

UKismetStringLibrary::DiffString

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

Description

Returns a human-readable description of the line-based LCS (longest common subsequence) difference between two strings, marking modifications, removals, and additions with ~, -, and + symbols.

Caveats & Gotchas

  • Only compiled under WITH_EDITOR — this function does not exist in packaged/shipping builds, so calling code guarded incorrectly will fail to compile or link there.
  • The header explicitly warns the diff is expensive for large strings; it's intended for editor tooling, not runtime gameplay logic.
  • The output is a formatted, human-readable report, not structured data — it isn't meant to be parsed programmatically.

Signature

static FString DiffString(const FString& First, const FString& Second)

Parameters

Name Type Description Default
First const FString& The string to treat as the basis for the comparison.
Second const FString& The string to treat as the change against First.

Return Type

FString

Example

Diff two config strings in an editor tool C++
#if WITH_EDITOR
const FString Report = UKismetStringLibrary::DiffString(OldConfig, NewConfig);
UE_LOG(LogTemp, Log, TEXT("%s"), *Report);
#endif

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.