Skip to content

Commit a1b797b

Browse files
Johny404Jan Vícha
and
Jan Vícha
authored
Added ExactCaseInsensitive constraint for string (#146)
Co-authored-by: Jan Vícha <[email protected]>
1 parent a2b0c6e commit a1b797b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

BTDB/ODBLayer/Constraint.cs

+1
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ public static Constraint<string> PredicateSlow(Predicate<string> predicate) =>
527527
new ConstraintStringPredicateSlow(predicate);
528528

529529
public static Constraint<string> Exact(string value) => new ConstraintStringExact(value);
530+
public static Constraint<string> ExactCaseInsensitive(string value) => Predicate((in ReadOnlySpan<char> v) => v.Equals(value, StringComparison.OrdinalIgnoreCase));
530531

531532
public static Constraint<string> UpTo(string value, bool including = true) =>
532533
new ConstraintStringUpTo(value, including);

0 commit comments

Comments
 (0)