String.UTF8View

struct String.UTF8View

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

Inheritance CollectionType, DebugPrintable, Printable, Reflectable, SequenceType, _CollectionType, _SequenceType, _Sequence_Type View Protocol Hierarchy →
Associated Types
Generator = IndexingGenerator<String.UTF8View>

Type alias inferred.

Element = CodeUnit

Type alias inferred.

Index = String.UTF8View.Index

Type alias inferred.

SubSequence = String.UTF8View

Type alias inferred.

Nested Types String.UTF8View.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.UTF8View.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.UTF8View.Index { get }
var startIndex: String.UTF8View.Index

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

Declaration

var startIndex: String.UTF8View.Index { get }

Subscripts

subscript(_: String.UTF8View.Index)

Declaration

subscript(position: String.UTF8View.Index) -> CodeUnit { get }
subscript(_: Range<String.UTF8View.Index>)

Declaration

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

Instance Methods

func generate()

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

Complexity: O(1)

Declaration

func generate() -> IndexingGenerator<String.UTF8View>
func getMirror()

Returns a mirror that reflects self.

Declaration

func getMirror() -> MirrorType