string() を使いましょう。大文字はじまりの String() と天と地の差があります。
julia> hoge = 1 julia> typeof(hoge) Int64 julia> string(hoge) "1" julia> String(hoge) ERROR: MethodError: Cannot `convert` an object of type Int64 to an object of type String This may have arisen from a call to the constructor String(...), since type constructors fall back to convert methods. Stacktrace: [1] String(::Int64) at ./sysimg.jl:77
0 件のコメント:
コメントを投稿