Skip to content

Commit

Permalink
Merge pull request #14 from FHIR/dev
Browse files Browse the repository at this point in the history
Fix: Inverted string search test in some combinations.
  • Loading branch information
GinoCanessa authored Sep 10, 2024
2 parents 31fbbec + f220fcc commit 70a8b38
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 70a8b38

Please sign in to comment.