> For the complete documentation index, see [llms.txt](https://docs.cheddar.vihan.org/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheddar.vihan.org/docs/standard-library/string/ord.md).

# Ord

| type   | returns  |
| ------ | -------- |
| Method | `number` |

## Arguments

| name  | type            | description                                                             |
| ----- | --------------- | ----------------------------------------------------------------------- |
| index | int, default: 0 | The index within the string in which to determine the character code of |

## Explanation

Returns the character code of the character at the given index

## Examples

```swift
"a".ord() == 97
"abc".ord() == 97
"abc".ord(1) == 98
```
