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

Simpler and More Clear ``Common Operations'' #43741

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

WrRan
Copy link
Contributor

@WrRan WrRan commented Jan 10, 2022

This part provides how to use findfirst/findlast/findnext/findprev to search a specific char from the string.

In the old version, we find the index as follows:

findfirst(isequal('o'), "xylophone")

Though it is right (isequal provides a predicate function for the findfirst(predicate::Function, A)), it is verbose and a little confused for newcomers.
So I have updated the example to:

findfirst('o', "xylophone")

@fredrikekre fredrikekre merged commit 631f195 into JuliaLang:master Jan 11, 2022
@oscardssmith oscardssmith added the docs This change adds or pertains to documentation label Jan 11, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants