Skip to content

Commit

Permalink
Added ExactCaseInsensitive constraint for string (#146)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Vícha <j.vicha@quadient.com>
  • Loading branch information
Johny404 and Jan Vícha committed Feb 28, 2024
1 parent a2b0c6e commit a1b797b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions BTDB/ODBLayer/Constraint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ public static partial class String
new ConstraintStringPredicateSlow(predicate);

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

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

0 comments on commit a1b797b

Please sign in to comment.