Skip to content

Instantly share code, notes, and snippets.

@Lokno
Last active January 1, 2026 23:19
Show Gist options
  • Select an option

  • Save Lokno/7c464c47f6db62a051eb2c5a1827eae7 to your computer and use it in GitHub Desktop.

Select an option

Save Lokno/7c464c47f6db62a051eb2c5a1827eae7 to your computer and use it in GitHub Desktop.
Expose the existing LevenshteinDistance code to blueprints
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "BlueprintLibraryLD.generated.h"
UCLASS()
class YOURPROJECT_API UBlueprintLibraryLD : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
// Uses UE's templated Algo::LevenshteinDistance
UFUNCTION(BlueprintCallable, Category="MyFunctions")
static int32 LevenshteinDistance(const FString& A, const FString& B);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment