NSAttributedString

class NSAttributedString

A string that has associated attributes (such as visual style, hyperlinks, or accessibility data) for portions of its text.

  • property documentation (update this)

    Declaration

    var string: String { get }
  • property documentation (update this)

    Declaration

    var length: Double { get }
  • property documentation (update this)

    Declaration

    var runs: Array { get }
  • property documentation (update this)

    Declaration

    var lineCount: Double { get }
  • The object’s description

    Declaration

    var description: String { get }
  • Compares two values for equality.

    The equals function is invoked using infix notation as in the following code snippet: lhs == rhs.

    Declaration

    func equals(_ lhs: NSAttributedString) -> Bool

    Parameters

    lhs

    A value.

    rhs

    Another value.

    Return Value

    true if the lhs and rhs are equal, false otherwise.

  • Seperates a string based on the provided seperator.

    Iterates through a string and seperates characters between each instance of the seperator into array indecies.

    Declaration

    func components(seperatedBy seperator: String) -> Array

    Parameters

    seperator

    The characted used as a seperator.

    Return Value

    An Array of strings where each index is the range of characters between each index of the seperator character in the original string.