NSString

class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding
  • Converts a range of byte offsets in self to a Range<String.Index> suitable for filtering self as a String.

    Declaration

    Swift

    func rangeFromByteRange(start: Int, length: Int) -> Range<String.Index>?

    Parameters

    start

    Starting byte offset.

    length

    Length of bytes to include in range.

    Return Value

    An equivalent Range<String.Index>.

  • Converts a range of byte offsets in self to a Range<String.Index> suitable for filtering self as a String.

    Declaration

    Swift

    func range(from byteRange: NSRange) -> Range<String.Index>?

    Parameters

    byteRange

    The byte range.

    Return Value

    An equivalent Range<String.Index>.