%% Right-Justify Text
% Create a string array in which some elements have trailing whitespace characters. Starting in R2017a, you can create strings using double quotes.

str1 = ["Skylab";
        "Mir   ";
        "ISS   "]

%
% Justify the text on the right. strjust does not alter the first element because "Skylab" has no whitespace.

str2 = strjust(str1)

% Copyright 2012 The MathWorks, Inc.