%% Ignore Empty Lines in Text File
% View the contents of the file capital_cities.txt.

type 'capital_cities.txt'

% Create a 5-by-1 string array by skipping the empty lines while reading capital_cities.txt. The array still contains the space characters from the input, but not the empty lines.

lines = readlines("capital_cities.txt","EmptyLineRule","skip")

% Copyright 2020 The MathWorks, Inc.
%