StringProtocol

extension StringProtocol where Index == String.Index

Available where Index == String.Index

  • Create a NSRange from a Range.

    Declaration

    Swift

    public func nsRange(from range: Range<Index>) -> NSRange

    Parameters

    range

    a Range.

    Return Value

    a NSRange.