In julia, Char and String are not comparable.
julia> 'a' == "a" false
How to convert Char value to String value?
I tried the following functions, but none of them work.
julia> convert(String, 'a') ERROR: MethodError: Cannot `convert` an object of type Char to an object of type String julia> String('a') ERROR: MethodError: Cannot `convert` an object of type Char to an object of type String julia> parse(String, 'a') ERROR: MethodError: no method matching parse(::Type{String}, ::Char)
source share