UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WildcardString.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "CoreTypes.h"
7#include "Misc/CString.h"
8
17 : public FString
18{
19public:
20
23 : FString()
24 { }
25
31 FWildcardString( const FString& Pattern )
32 : FString(Pattern)
33 { }
34
40 FWildcardString( const TCHAR* Pattern )
41 : FString(Pattern)
42 { }
43
44public:
45
51 bool ContainsWildcards( ) const
52 {
53 return ContainsWildcards(**this);
54 }
55
62 bool IsMatch( const TCHAR* Input ) const
63 {
64 return IsMatch(**this, Input);
65 }
66
73 bool IsMatch( const FString& Input ) const
74 {
75 return IsMatch(**this, *Input);
76 }
77
78public:
79
86 static CORE_API bool ContainsWildcards( const TCHAR* Pattern );
87
94 static CORE_API bool IsMatch( const TCHAR* Pattern, const TCHAR* Input );
95
104 static CORE_API bool IsMatchSubstring( const TCHAR* Pattern, const TCHAR* Input, const TCHAR* InputEnd, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive);
105
106protected:
107
109 static const TCHAR EndOfString = TCHAR('\0');
110
112 static const TCHAR ExactWildcard = TCHAR('?');
113
115 static const TCHAR SequenceWildcard = TCHAR('*');
116};
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition WildcardString.h:18
static CORE_API bool IsMatchSubstring(const TCHAR *Pattern, const TCHAR *Input, const TCHAR *InputEnd, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive)
Definition WildcardString.cpp:86
static const TCHAR ExactWildcard
Definition WildcardString.h:112
bool IsMatch(const FString &Input) const
Definition WildcardString.h:73
static const TCHAR EndOfString
Definition WildcardString.h:109
FWildcardString(const FString &Pattern)
Definition WildcardString.h:31
bool IsMatch(const TCHAR *Input) const
Definition WildcardString.h:62
FWildcardString(const TCHAR *Pattern)
Definition WildcardString.h:40
FWildcardString()
Definition WildcardString.h:22
static const TCHAR SequenceWildcard
Definition WildcardString.h:115
bool ContainsWildcards() const
Definition WildcardString.h:51
Type
Definition CString.h:21
@ CaseSensitive
Definition CString.h:23