strtrim
Remove leading and trailing whitespace from a string.
Syntax
Section titled “Syntax”s = strtrim(str)Description
Section titled “Description”Strips both leading and trailing whitespace from str. Internal whitespace is preserved. Applied elementwise to cell arrays of strings.
Example
Section titled “Example”strtrim(' hello ') % 'hello'