---
title: "ruby(at:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcaption/ruby(at:)"
---

# ruby(at:)

Returns the ruby text at the index position.

## Declaration

```swift
@nonobjc func ruby(at index: String.Index) -> (AVCaption.Ruby?, Range<String.Index>)
```

## Parameters

- `index`: A character position in the caption text.

## Return Value

Return Value A tuple that contains the ruby text and range to which it applies.

## See Also

### Accessing advanced typography

- [AVCaption.Ruby](avfoundation/avcaption/ruby.md)
- [textCombine(at:)](avfoundation/avcaption/textcombine(at:).md)
- [AVCaption.TextCombine](avfoundation/avcaption/textcombine.md)
