-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
seekuntil function to mirror readuntil #36132
Comments
Yes, that does make sense. |
Turns out this does already exist which I didn't find until I had already mostly implemented this. It's |
And/or provide |
Is there another example in Base where multiple aliases are provided to the same function? I'm not exactly sure what doing so should look like in docstrings and generated documentation. |
We have done so occasionally when the name for something was really bad. We would deprecate |
Because of the check for eof on each iteration, this will not be as efficient as readuntil or skipchars, but it is still sometimes useful, and saves boilerplate versus a while(!eof(io)) read(io, T) loop. The function signature is patterned after the read(io, T) function signature. Prompted by JuliaLang#36132 but does not close JuliaLang#36132 I am open to better/clearer names for this function.
Part 1 of addressing JuliaLang#36132
Per discussion in JuliaLang#36132, I believe this name is much clearer. Another option is "seekuntil". Closes JuliaLang#36132
This saves boilerplate versus a while !eof(io); read(io, T) loop. The function signature is patterned after the read(io, T) function signature. Prompted by JuliaLang#36132 but does not close JuliaLang#36132 I am open to better/clearer names for this function.
Closes JuliaLang#36132 The name skipchars does not clearly communicate the functionality available. Tests for skipchars were left in place to ensure the @deprecate macro correctly converted those calls to using skipuntil.
Closes JuliaLang#36132 The name skipchars does not clearly communicate the functionality available. Tests for skipchars were left in place to ensure the @deprecate macro correctly converted those calls to using skipuntil.
Closes JuliaLang#36132 The name skipchars does not clearly communicate the functionality available. Tests for skipchars were left in place to ensure the @deprecate macro correctly converted those calls to using skipuntil.
Closes JuliaLang#36132 The name skipchars does not clearly communicate the functionality available. Tests for skipchars were left in place to ensure the @deprecate macro correctly converted those calls to using skipuntil. Although CI only runs tests with --depwarn=error, I have confirmed these tests pass successfully with --depwarn=yes/no locally.
I often find myself wishing for a
seekuntil
function that behaves likereaduntil
but does not allocate a string. It seems like an obviously useful function for lots of purposes. Is there interest in including such a function inBase
?The text was updated successfully, but these errors were encountered: