%% Strip Leading and Trailing Spaces from Strings
% Create a string array. Starting in R2017a, you can create strings using double quotes.

str = ["Ann Marie      ";
       "          James";
       "Pauline        "]

%
% Delete the leading and trailing space characters in each string.

newStr = strip(str)

% Copyright 2012 The MathWorks, Inc.