Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

RegexPattern.Options.remove(_:)

Swift
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift

View as Markdown

Module
RegexPattern
Declared in
Options
Package
libtmux-swift
remove(_:) ( member : Self.Element ) → Self.Element?
method
method
remove(_:)

Inherited from OptionSet.remove(_:)

Removes the given element and all elements subsumed by it.

In the following example, the priority shipping option is removed from the options option set. Attempting to remove the same shipping option a second time results in nil, because options no longer contains priority as a member.

var options: ShippingOptions = [.secondDay, .priority] let priorityOption = options.remove(.priority) print(priorityOption == .priority) // Prints "true"

print(options.remove(.priority)) // Prints "nil"

In the next example, the express element is passed to remove(_:) . Although express is not a member of options , express subsumes the remaining secondDay element of the option set. Therefore, options is emptied and the intersection between express and options is returned.

let expressOption = options.remove(.express) print(expressOption == .express) // Prints "false" print(expressOption == .secondDay) // Prints "true"

  • Parameter member: The element of the set to remove.
  • Returns: The intersection of [member] and the set, if the intersection was nonempty; otherwise, nil.

0 declared, 0 inherited

Esc

Type to search.