MCPcopy Create free account
hub / github.com/PCGEx/PCGExtendedToolkit / Compare

Function Compare

Source/PCGExtendedToolkit/Private/PCGExCompare.cpp:106–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 bool Compare(const EPCGExStringComparison Method, const FString& A, const FString& B)
107 {
108 switch (Method)
109 {
110 case EPCGExStringComparison::StrictlyEqual:
111 return A == B;
112 case EPCGExStringComparison::StrictlyNotEqual:
113 return A != B;
114 case EPCGExStringComparison::LengthStrictlyEqual:
115 return A.Len() == B.Len();
116 case EPCGExStringComparison::LengthStrictlyUnequal:
117 return A.Len() != B.Len();
118 case EPCGExStringComparison::LengthEqualOrGreater:
119 return A.Len() >= B.Len();
120 case EPCGExStringComparison::LengthEqualOrSmaller:
121 return A.Len() <= B.Len();
122 case EPCGExStringComparison::StrictlyGreater:
123 return A.Len() > B.Len();
124 case EPCGExStringComparison::StrictlySmaller:
125 return A.Len() < B.Len();
126 case EPCGExStringComparison::LocaleStrictlyGreater:
127 return A > B;
128 case EPCGExStringComparison::LocaleStrictlySmaller:
129 return A < B;
130 case EPCGExStringComparison::Contains:
131 return A.Contains(B);
132 case EPCGExStringComparison::StartsWith:
133 return A.StartsWith(B);
134 case EPCGExStringComparison::EndsWith:
135 return A.EndsWith(B);
136 default:
137 return false;
138 }
139 }
140
141 bool Compare(const EPCGExComparison Method, const TSharedPtr<PCGExData::FTagValue>& A, const double B, const double Tolerance)
142 {

Callers 15

MatchesMethod · 0.70
ProcessCandidatesMethod · 0.50
TestMethod · 0.50
InitMethod · 0.50
TestDotMethod · 0.50
TestHashMethod · 0.50
TestMethod · 0.50
TestMethod · 0.50
TestMethod · 0.50
TestMethod · 0.50
OutputMethod · 0.50

Calls 2

LenMethod · 0.80
ContainsMethod · 0.45

Tested by 15

TestMethod · 0.40
TestDotMethod · 0.40
TestHashMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40
TestMethod · 0.40