File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ open FSharpPlus.Control
77[<AutoOpenAttribute>]
88module Operators =
99
10+ open FSharpPlus.Internals .Errors
11+
1012 // Common combinators
1113
1214 /// <summary >Creates a new function with first two arguments flipped.</summary >
@@ -1659,6 +1661,17 @@ module Operators =
16591661
16601662 #endif
16611663
1664+ /// <summary >
1665+ /// An active pattern to match strings in a case-insensitive way.
1666+ /// </summary >
1667+ /// <category index =" 23 " >Additional Functions</category >
1668+ let (| CiString | _ |) ( ciString : string ) ( source : string ) : unit option =
1669+ let ciString = nullArgCheck ( nameof ciString) ciString
1670+ let source = nullArgCheck ( nameof source) source
1671+
1672+ match source with
1673+ | s when s.Equals( ciString, StringComparison.OrdinalIgnoreCase) -> Some ()
1674+ | _ -> None
16621675
16631676 /// <summary >
16641677 /// Safely dispose a resource (includes null-checking).
You can’t perform that action at this time.
0 commit comments