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

index(_:offsetByCharacters:)

Returns the position of the character offset a given distance, measured in characters, from a given string index.

Declaration 宣言

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

Parameters パラメータ

i

The index of a position in the string.

distance

The number of charcters to advance by.

Return Value 戻り値

The position of the character offset distance characters from position i.

See Also 参照

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