Skip to content

Commit

Permalink
Fix: Inverted string search test in some combinations.
Browse files Browse the repository at this point in the history
  • Loading branch information
GinoCanessa committed Sep 10, 2024
1 parent 31fbbec commit f220fcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FhirStore.CommonVersioned/Search/EvalStringSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static bool TestStringStartsWith(ITypedElement valueNode, ParsedSearchPar
continue;
}

if (sp.Values[i].StartsWith(value, StringComparison.OrdinalIgnoreCase))
if (value.StartsWith(sp.Values[i], StringComparison.OrdinalIgnoreCase))
{
return true;
}
Expand Down Expand Up @@ -63,7 +63,7 @@ public static bool TestStringContains(ITypedElement valueNode, ParsedSearchParam
continue;
}

if (sp.Values[i].Contains(value, StringComparison.OrdinalIgnoreCase))
if (value.Contains(sp.Values[i], StringComparison.OrdinalIgnoreCase))
{
return true;
}
Expand Down Expand Up @@ -92,7 +92,7 @@ public static bool TestStringExact(ITypedElement valueNode, ParsedSearchParamete
continue;
}

if (sp.Values[i].Equals(value, StringComparison.Ordinal))
if (value.Equals(sp.Values[i], StringComparison.Ordinal))
{
return true;
}
Expand Down

0 comments on commit f220fcc

Please sign in to comment.