String.data in Compat.jl?

julia> a = "str"
"str"

julia> b = a.data
ERROR: type String has no field data
Use `Vector{UInt8}(str)` instead.

What are you suggesting? The newer form should work on all versions supported by compat

I hit send before completely formulating the question. I didn’t See from the compat docu if it’s Supported.

What’s the question then? There’s nothing that needs to be supported in Compat.

I was confused. Initially i tried to ask: How can i use Compat for string.data issues. But (as you wrote) str_data = Vector{UInt8}(str) is working in julia versions, independent of Compat.

It might be nice if we could suggest use b"str" instead, but I don’t think we can know that the String came from a constant.