How to remowe empty rows in Array{String,1}?


#1

How to remowe empty rows in Array{String,1} ?

'2993-element Array{String,1}:
""
""
""
""
""
“some test”
""
'
Paul


#2

How did you create the array? You can test for an empty string when you create it. Or just make a new array without the empty strings in.


#3
[s for s in yourarray if !isempty(s)]

#4
obj = ["", "a", "", "b", ""]
filter(!isempty, obj) # standard way
filter!(!isempty, obj) # in-place variant