Is there an easy way to initialize+fill a large array of strings?


#1

I am looking for a way to initialise + fill a large array of String values, analogous to the method to initialise+fill an array of e.g. Floats: A = zeros(Float64,1000). Is there such a method for strings?


#2
julia> fill("", 10)
10-element Array{String,1}:
 ""
 ""
 ""
 ""
 ""
 ""
 ""
 ""
 ""
 ""

julia> ["*"^k for k=1:10]
10-element Array{String,1}:
 "*"
 "**"
 "***"
 "****"
 "*****"
 "******"
 "*******"
 "********"
 "*********"
 "**********"

#3

This works, thank you very much!!