Dicussions about about coding conventions in the Julia source seem to fit well in julia-dev.
I asked here, because I wondered if this was just historical or not (i.e. if the Vector alias was just added recently).
I also saw something in the base code that I wasn’t sure was correct, it used AbstractArray{UInt16} instead of AbstractArray{UInt16,1} for a UTF-16 string,and it looks like those are different somehow…
I also saw something in the base code that I wasn’t sure was correct, it used AbstractArray{UInt16} instead of AbstractArray{UInt16,1} for a UTF-16 string,
and it looks like those are different somehow…
N N 1 N
function readbytes!(s::IO, b::AbstractArray{UInt8}, nb=length(b))
function is_valid_utf16(data::AbstractArray{UInt16})convert(T::Type{UTF16String}, data::AbstractArray{UInt16}) =
convert(T, reshape(data, length(data)))
convert(T::Type{UTF16String}, data::AbstractArray{Int16}) = convert(T, reinterpret(UInt16, data))
function convert(T::Type{UTF16String}, bytes::AbstractArray{UInt8})
function convert(T::Type{UTF32String}, bytes::AbstractArray{UInt8})
Ah, good point... still not used to the way multidimensional arrays work in Julia (I was used to multidimensional associative arrays).What about the cases in utf16.jl and utf32.jl? Am I correct that those really should be AbstractVector?