Option
A MongoDB regex matching option.
@frozen enum Option
A MongoDB regex matching option.
@frozen enum Option
import BSONABI
Models the BSON type system and the binary interface of the BSON serialization format.
@frozen struct Regex
A MongoDB regex.
@frozen enum BSON
The namespace for all BSON types.
case i
Enables case-insensitive matching.
case l
Enables localization for \w
, \W
, etc.
case m
Enables multiline matching.
case s
Enables dotall mode. ('.'
matches everything.)
case u
Enables unicode awareness for \w
, \W
, etc.
case x
Enables verbose mode.
init(pattern: String, options: Options)
init(pattern: String, options: some StringProtocol) throws
var options: Options
var pattern: String
var size: Int { get }
The size of this regex when encoded with interior and trailing null bytes.
@frozen struct OptionError
A MongoDB regex matching options string contained an invalid unicode scalar.
@frozen struct Options
A set of MongoDB regex matching options.
protocol BitwiseCopyable
protocol CaseIterable
A type that provides a collection of all of its values.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(_ scalar: Unicode.Scalar)
init?(rawValue: UInt8)
var character: Character { get }
var scalar: Unicode.Scalar { get }
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)