%% Strip Spaces from Side of String
% Create a string array. Starting in R2017a, you can create strings using double quotes.

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

%
% Delete space characters from the right side only.

newStr = strip(str,'right')

% Copyright 2012 The MathWorks, Inc.