Replacer
public protocol Replacer: MatchBehavior
Matcher that can transform strings by replacing matched areas
-
replace matches from the input with the given template
Declaration
Swift
func replaceMatches(in: String, to: String) -> String -
supportsReplaceTemplatesDefault implementationtrue if this pattern type supports templates
Default Implementation
true if this pattern type supports templates
Declaration
Swift
var supportsReplaceTemplates: Bool -
escape(template:)Default implementationescape the template pattern
Default Implementation
Declaration
Swift
func escape(template: String) -> String
Replacer Protocol Reference