Skip to content
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

Improve split docs #530

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Improve split docs #530

merged 3 commits into from
Nov 14, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Oct 31, 2023

No description provided.

@hadley hadley requested a review from jennybc October 31, 2023 12:54
Copy link
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

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

Some weakly-held nitpicky opinions/suggestions.

R/split.R Outdated Show resolved Hide resolved
Comment on lines +7 to +10
#' * `str_split_1()` takes a single string and splits it into pieces,
#' returning a single character vector.
#' * `str_split_i()` splits each string in a character vector into pieces and
#' extracts the `i`th value, returning a character vector.
Copy link
Member

Choose a reason for hiding this comment

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

This is not at all what I was asked to do / review but I'm still just noticing that these function names follow a common pattern. But then they do pretty different things. 🤔 I think this is the first time I've contemplated str_split_i().

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, they both return a character vector, but for rather different reasons. Probably too later to do much about it now.

R/split.R Outdated Show resolved Hide resolved
R/split.R Outdated Show resolved Hide resolved
hadley and others added 2 commits November 14, 2023 08:04
@hadley hadley merged commit 72db765 into main Nov 14, 2023
12 checks passed
@hadley hadley deleted the split-docs branch November 14, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants