Skip to content

Add some signposting to the String docs for pattern matching #13514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2024
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
3 changes: 3 additions & 0 deletions lib/elixir/lib/string.ex
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ defmodule String do
iex> eacute
233

See the documentation for [`<<>>`](`<<>>/1`) or the Patterns and Guards
guide for more information on binary pattern matching
Copy link
Member

@whatyouhide whatyouhide Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can link to the guide as well:

Suggested change
See the documentation for [`<<>>`](`<<>>/1`) or the Patterns and Guards
guide for more information on binary pattern matching
See the documentation for [`<<>>`](`<<>>/1`) and the [*Patterns and Guards*
guide](patterns-and-guards.md) for more information on binary pattern matching.

Can you try out make docs_elixir locally with this and see if the link is to the right page?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.md perhaps?
Another instance from Kernel doc:

[Patterns and guards](patterns-and-guards.md)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sure yep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. built the docs and it links to the correct pages


You can also fully convert a string into a list of integer code points,
known as "charlists" in Elixir, by calling `String.to_charlist/1`:

Expand Down