Structurefwcd.swift-utils 4.6.2Utils
LegacyRegex
A wrapper around NSRegularExpression
with a more modern API.
struct LegacyRegex
Kept around for legacy purposes. Please use the standard library’s Regex
type in new code.
A wrapper around NSRegularExpression
with a more modern API.
struct LegacyRegex
Kept around for legacy purposes. Please use the standard library’s Regex
type in new code.
import Utils
protocol CustomStringConvertible
A type with a customized textual representation.
init(from rawPattern: String, caseSensitive: Bool = true) throws
static func escape(_ str: String) -> String
var caseSensitive: Bool { get }
var description: String { get }
var rawPattern: String { get }
func allGroups(in str: String) -> [[String]]
func firstGroups(in str: String) -> [String]?
func matchCount(in str: String) -> Int
func matches(in str: String) -> [String]
func replace(in str: String, using replacer: ([String]) -> String) -> String
func replace(in str: String, with replacement: String, casePreserving: Bool = false) -> String