String.UTF16View

struct String.UTF16View

A collection of UTF-16 code units that encodes a String value.

Inheritance CollectionType, DebugPrintable, Printable, Reflectable, SequenceType, Sliceable, _CollectionType, _SequenceType, _Sequence_Type, _Sliceable View Protocol Hierarchy →
Associated Types
Generator

A type whose instances can produce the elements of this sequence, in order.

Generator = Generator

Type alias inferred.

Element = UInt16

Type alias inferred.

Index = String.UTF16View.Index

Type alias inferred.

SubSequence = String.UTF16View

Type alias inferred.

Nested Types String.UTF16View.Index
Import import Swift

Instance Variables

var debugDescription: String

Declaration

var debugDescription: String { get }
var description: String

Declaration

var description: String { get }
var endIndex: String.UTF16View.Index

The "past the end" position.

endIndex is not a valid argument to subscript, and is always reachable from startIndex by zero or more applications of successor().

Declaration

var endIndex: String.UTF16View.Index { get }
var startIndex: String.UTF16View.Index

The position of the first code unit if the String is non-empty; identical to endIndex otherwise.

Declaration

var startIndex: String.UTF16View.Index { get }

Subscripts

subscript(_: String.UTF16View.Index)

Declaration

subscript(i: String.UTF16View.Index) -> UInt16 { get }
subscript(_: Range<String.UTF16View.Index>)

Declaration

subscript(subRange: Range<String.UTF16View.Index>) -> String.UTF16View { get }

Instance Methods

func generate()

Return a generator over the code points that comprise this sequence.

Complexity: O(1)

Declaration

func generate() -> Generator
func getMirror()

Returns a mirror that reflects self.

Declaration

func getMirror() -> MirrorType