Instance Method インスタンスメソッド

index(_:offsetByUnicodeScalars:)

Returns the position of the Unicode scalar offset a given distance, measured in Unicode scalars, from a given string index.

Declaration 宣言

func index(_ i: AttributedString.Index, offsetByUnicodeScalars distance: Int) -> AttributedString.Index

Parameters パラメータ

i

The index of a position in the string.

distance

The number of Unicode scalars to advance by.

Return Value 戻り値

The position of the Unicode scalar offset distance Unicode scalars from position i.

See Also 参照

Accessing Indices インデックスにアクセスする