-
-
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
Documentation of utf32
incorrectly states that an Array
of UInt32
is not copied by UTF32String
#11389
Comments
utf32
incorrectly states that an Array
of UInt32
is not copied by UTF32String
We should just add the missing constructor that does not do the copy:
(The |
That's what I had thought... but I am thinking that this is rather dangerous... you basically have mutable strings, whether you like it or not... It might be nicer if there were some way of having an "unsafe" constructor, that could be used by the internals (or where people felt sure they knew what they are doing). For now I'll just add the missing constructor. |
Fix #11389 Add UTF32String constructor for Vector{UInt32}
While it is true that an
Array
ofChar
is not copied, the same as anArray
ofUInt8
forUTF8String
, or ofUInt16
forUTF16String
,UTF32String
copies the array, if it is anArray
ofUInt32
.Either the documentation should point out this inconsistency, or else the code needs to change to have a constructor that does a
reinterpret(Char, array)
so as not to copy (which is my vote).Either way, the documentation should be changed (to say that
Array
ofUInt32
is copied, andChar
not, or with the code changed, that both are not copied...)See https://groups.google.com/forum/#!topic/julia-dev/ZBSelpTlw58
The text was updated successfully, but these errors were encountered: