[julia-users] Re: Converting ASCIIString to and from Array{UInt8,1}

2015-11-18 Thread James Gilbert
Thanks. I had tired convert(), but didn't use the correct type specifier.

[julia-users] Re: Converting ASCIIString to and from Array{UInt8,1}

2015-11-17 Thread Dan
`convert` is the go-to equivalent in Julia of casting. In this case: uint_array = convert(Vector{UInt8},str) but there are many ways of getting similar results! BTW `convert(ASCIIString,uint_array)` gets back. On Wednesday, November 18, 2015 at 1:49:36 AM UTC+2, James Gilbert wrote: > > Solv

[julia-users] Re: Converting ASCIIString to and from Array{UInt8,1}

2015-11-17 Thread James Gilbert
Solved! After finding base/ascii.jl I find I can: str = "hello" uint_array = str.data str = ASCIIString(uint_array) though I probably shouldn't be calling str.data outside of the Julia language files...