FUNCTION REFERENCE
strip
Remove edge whitespace or chosen characters.
Remove edge whitespace or chosen characters.
Syntax
s = strip(s,side,characters)side is left, right or both; default both removes Unicode whitespace, but keeps significant whitespace char(133), char(160), char(8199) and char(8239) unless that character is named. strip(s,'-') strips '-' from both ends. Char and cellstr inputs retain their type.
Example
strip("--a--",'both','-')Differences from MATLAB: bounded 2-D string storage (65536 elements, 2 MiB text); MAT persistence and N-D strings are not implemented.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.