-
-
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
deprecate String(::IOBuffer)
#21438
Comments
I'm using String(take!(b)) a few times in Cairo.jl runtests, so i'd guess there are other who test if the output to an io stream contains something. |
I use |
same reason. |
BTW, the current |
Sorry I wasn't clear. There's nothing wrong with
|
Furthermore, although unfortunate, I think it's inaccurate to assume that every (This is not relevant to |
Yes, but I figured But indeed if |
|
As long as the constructor converts the buffer to UTF-8, I don't see the problem. It could also be interesting to be able to create an encoded string in a custom type like |
Yes, I guess that's true. Actually |
String(::IOBuffer)
to readstring
String(::IOBuffer)
to readstring
or read(io, String)
String(::IOBuffer)
to readstring
or read(io, String)
String(::IOBuffer)
Resolved: will deprecate this to |
deprecate `String(io::IOBuffer)`. fixes #21438
Would it make sense to have |
|
Most of the usage I saw can just use |
The |
I know.... I just mean that most of the time it's not needed so unless it's clear that a lot of the code actually need the |
My encounter with |
The problem is that |
So is the plan to reintroduce |
This should not be defined as |
I'm not sure what to make of this; I see why the function is useful, but it's pretty ad-hoc. For example there is no |
This constructor method does not seem to be necessary (left over from the
bytestring
function). It could beseekstart(b); readstring(b)
orString(take!(b))
.Actually,
String(::IOBuffer)
is a bit of a strange function since it gives you a copy of the data in the buffer without affecting the stream state in any way. Does anybody use this?The text was updated successfully, but these errors were encountered: