%% Pad Strings to Different Sides
% Create a string array. Starting in R2017a, you can create strings using double quotes.

str = ["Mary";"Elizabeth";"James"]

%
% Pad the strings to the left.

newStr = pad(str,'left')

%
% Pad both sides.

newStr = pad(str,'both')

% Copyright 2012 The MathWorks, Inc.