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

index(_:offsetByRuns:)

Returns the position of the run offset a given number of runs from a given string index.

Declaration 宣言

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

Parameters パラメータ

i

The index of a position in the string.

distance

The number of runs to advance by.

Return Value 戻り値

The position of the run offset distance runs from position i.

See Also 参照

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