How to concatenate vectors to be a matrix, not a vector

Or simply,

julia> split.(minefield, "")
3-element Vector{Vector{SubString{String}}}:
 ["1", "2", "3"]
 ["4", "5", "6"]
 ["7", "8", "9"]

But if lines are gauranteed to have the same length, this will be much faster:

julia> [[string(minefield[i][j]) for i=1:3] for j=1:3]
3-element Vector{Vector{String}}:
 ["1", "4", "7"]
 ["2", "5", "8"]
 ["3", "6", "9"]
2 Likes