Skip to content

Explicitly mention trimming in String.split/1 doc #13802

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
Sep 1, 2024

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Sep 1, 2024

Makes this explicit since it was deemed surprising in elixir-lang/elixir-lang.github.com#1768

@@ -375,6 +375,11 @@ defmodule String do
iex> String.split("no\u00a0break")
["no\u00a0break"]

Removes empty strings, like when using `trim: true` in `String.split/3`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Removes empty strings, like when using `trim: true` in `String.split/3`.
This function removes empty strings, similar to `trim: true` in `String.split/3`.

Copy link
Member

Choose a reason for hiding this comment

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

I think English prefers the sentence subject to be explicit most times. :)

@sabiwara sabiwara merged commit 1ccb7a1 into elixir-lang:main Sep 1, 2024
9 checks passed
@sabiwara sabiwara deleted the doc-string-split branch September 1, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants