deblank
Remove trailing whitespace from a string.
Syntax
Section titled “Syntax”s = deblank(str)Description
Section titled “Description”Strips trailing whitespace (spaces, tabs, newlines) from str. Leading whitespace is preserved. Applied elementwise to cell arrays of strings.
Example
Section titled “Example”deblank(' hello ') % ' hello'