RealDocs

UKismetStringLibrary::MatchesWildcard

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

Description

Tests a string against a simple *?-style wildcard pattern, where * matches any run of characters and ? matches a single character.

Caveats & Gotchas

  • The header explicitly warns this is a simple, slow routine — avoid calling it in tight loops over large arrays of strings.
  • This is glob-style matching only, not regular expressions; there is no way to use character classes or alternation.

Signature

static bool MatchesWildcard(const FString& SourceString, const FString& Wildcard, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase)

Parameters

Name Type Description Default
SourceString const FString& The string to test.
Wildcard const FString& A *?-style wildcard pattern.
SearchCase ESearchCase::Type Whether the comparison is case-sensitive. ESearchCase::IgnoreCase

Return Type

bool

Example

Filter asset names by pattern C++
if (UKismetStringLibrary::MatchesWildcard(AssetName, TEXT("SM_Rock_*")))
{
    // AssetName is a rock static mesh variant
}

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.