Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/elixir/lib/string.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,10 @@ defmodule String do
Returns the grapheme at the `position` of the given UTF-8 `string`.
If `position` is greater than `string` length, then it returns `nil`.

Note: keep in mind this function has to linearly traverse the string.
If you want to access a string or a binary in constant time based on the
number of bytes, use `Kernel.binary_slice/3` or `:binary.at/2` instead.

## Examples

iex> String.at("elixir", 0)
Expand Down
Loading