CoordinateLexer

internal struct CoordinateLexer : IteratorProtocol, Sequence

A struct that conforms to the Sequence protocol that takes a coordinate string and continuously returnsCGPoints

  • Generates a CGPoint

    Declaration

    Swift

    typealias Element = CGPoint
  • Creates a new CoordinateLexer from a comma or space separated number string

    Declaration

    Swift

    internal init(coordinateString: String)
  • Required by Swift’s IteratorProtocol that returns a new CoordinateLexer

    Declaration

    Swift

    internal func makeIterator() -> CoordinateLexer
  • Required by Swift’s IteratorProtocol that returns the next CGPoint or nil if it’s at the end of the sequence

    Declaration

    Swift

    internal mutating func next() -> Element?