Contents

isValid(within:)

Indicates whether the range set is valid for use with the provided attributed string.

Declaration

func isValid(within text: some AttributedStringProtocol) -> Bool

Parameters

  • text:

    An attributed string used to validate the range set.

Return Value

true when the range set is valid for use with the provided attributed string; otherwise, false. A range set is valid if each of its ranges are valid in the attributed string.