performValidatedReplacement(in:with:)
Replaces text in the range you specify with the attributed string you provide.
Declaration
func performValidatedReplacement(in range: NSRange, with attributedString: NSAttributedString) -> BoolParameters
- range:
The range of the replacement.
- attributedString:
The attributed string to use as the replacement text.
Return Value
Retuns true if the replacement was successful, false otherwise.
See Also
Checking and substituting text
checkTextInDocument(_:)checkTextInSelection(_:)checkText(in:types:options:)handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)enabledTextCheckingTypesisAutomaticDashSubstitutionEnabledtoggleAutomaticDashSubstitution(_:)isAutomaticDataDetectionEnabledtoggleAutomaticDataDetection(_:)isAutomaticSpellingCorrectionEnabledtoggleAutomaticSpellingCorrection(_:)isAutomaticTextReplacementEnabledtoggleAutomaticTextReplacement(_:)