That is the splice operator (also known as "splat"). It causes the contents of `a` to be passed as indvidual arguments rather than passing `a` as an array. So, string() behaves differently.
On Tue, Aug 19, 2014 at 11:55 PM, Ning Yin <[email protected]> wrote: > Thanks! That worked. > > I also found out that both string(a...) and CharString(a...) worked, > though I don't understand why the '...' is necessary here. > > > On Tuesday, August 19, 2014 9:50:33 PM UTC+8, Jacob Quinn wrote: > >> Try join() >> >> >> On Tue, Aug 19, 2014 at 8:04 AM, Ning Yin <[email protected]> wrote: >> >>> Hi Julia users, >>> >>> I was trying to convert an array of char's to string, and I've noticed >>> functions such as string or CharString, but non of these seem to work for >>> my case: >>> >>> Julia console: >>> ============== >>> julia> a = ['a', 'b', 'c'] >>> 3-element Array{Char,1}: >>> 'a' >>> 'b' >>> 'c' >>> >>> julia> string(a) >>> "Char[a,b,c]" >>> >>> julia> CharString(a) >>> ERROR: ArgumentError("UTF32String data must be NULL-terminated") >>> =============== >>> >>> Any idea? I'm using Julia Version 0.4.0-dev+238 (just cloned from >>> github). >>> >>> Thanks! >>> -Ning >>> >> >>
