File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ function convert(::Type{T},
195195 Str (C, _str_cpy (UInt8, vec, length (vec)))
196196end
197197
198+ convert (:: Type{UniStr} , vec:: AbstractArray{UInt8} ) = _str (vec)
199+
198200convert (:: Type{<:Str{C}} , vec:: AbstractArray{UInt8} ) where {C<: Union{BinaryCSE,Text1CSE} } =
199201 Str (C, _str_cpy (UInt8, vec, length (vec)))
200202convert (:: Type{<:Str{Text2CSE}} , vec:: AbstractArray{UInt16} ) =
@@ -210,6 +212,7 @@ convert(::Type{<:Str{Text4CSE}}, vec::AbstractArray{UInt32}) =
210212(:: Type{UniStr} )(str:: String ) = _str (str)
211213(:: Type{UniStr} )(str:: Str{<:Union{ASCIICSE,SubSet_CSEs}} ) = str
212214
215+ # need to fix this, should only allow already validated strings
213216function convert (:: Type{UniStr} , str:: T ) where {T<: Str }
214217 # handle zero length string quickly
215218 is_empty (str) && return empty_ascii
You can’t perform that action at this time.
0 commit comments