Simple question: How to change the character at a specific position of a string? Searched for a while in vain. Thanks.
For example:
julia> s=^("a",4)
"aaaa"
How to change the second character to 'b', that is to change s to:"abaa"
If/when you need the result, you can use join to get a string. For example:
julia> as = collect("aaaa")
4-element Array{Char,1}:
'a'
'a'
'a'
'a'
julia> as[2] = 'b'
'b'
julia> as
4-element Array{Char,1}:
'a'
'b'
'a'
'a'
julia> join(as)
"abaa"
// T