Instance Property

utf8

A UTF-8 encoding of self.

Declaration

var utf8: String.UTF8View { get set }

Relationships

From Protocol

See Also

Working with String Views

var characters: String.CharacterView

A view of the string’s contents as a collection of characters.

Deprecated
init(String.CharacterView)

Creates a string from the given character view.

init(Substring.CharacterView)

Creates a String having the given content.

func withMutableCharacters<R>((inout String.CharacterView) -> R)

Applies the given closure to a mutable view of the string’s characters.

var unicodeScalars: String.UnicodeScalarView

The string’s value represented as a collection of Unicode scalar values.

init(String.UnicodeScalarView)

Creates a string corresponding to the given collection of Unicode scalars.

init(Substring.UnicodeScalarView)

Creates a String having the given content.

var utf16: String.UTF16View

A UTF-16 encoding of self.

init(String.UTF16View)

Creates a string corresponding to the given sequence of UTF-16 code units.

init?(Substring.UTF16View)

Creates a String having the given content.

init(String.UTF8View)

Creates a string corresponding to the given sequence of UTF-8 code units.

init?(Substring.UTF8View)

Creates a String having the given content.