Wednesday, April 8, 2015

[MATLAB] Remove leading & training white-space (or new line, \n) from the string cell array

my MATLAB version : R2012b


result = strtrim(strin);


result = strtrim({'     Triming leading white-space';
                     'Triming trailing white-space      '};

result = 'Triming leading white-space'
           'Triming trailing white-space'

No comments:

Post a Comment