Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UKismetStringLibrary
Description
Returns a string describing the LCS difference between two strings, First and Second. This function is editor only because it is expensive for large strings. Examples:
("A", "") -> "- [ 0001 | ] A" ("", "") -> "" ("The quick brown fox", "The quick red fox") -> "~ [ 0001 | 0001 ] The quick brown fox ~~~~~ The quick red fox"
The numbers between the [], separated by |, are the line numbers in the First and Second string at which the difference occurs. Preceding the line number information is a symbol identifying the type of difference: A tilde (~) indicates a modification, a minus (-) indicates a removal from First, and a plus (+) indicates an addition to second.
| Name | DiffString |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetStringLibrary.h |
| Include Path | #include "Kismet/KismetStringLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Private/KismetStringLibrary.cpp |
UFUNCTION (BlueprintCallable, Category="Utilities|String")
static FString DiffString
(
const FString & First,
const FString & Second
)
the LCS difference between the First and Second string
Parameters
| Name | Remarks |
|---|---|
| First | The string to treat as basis |
| Second | The string to treat as change |