res = strip(str)
res = strip(str, side)
res = strip(str, side, stripCharacter)
| Parameter | Description |
|---|---|
| str | character array, string scalar, string array, or cell array of character vectors. |
| side | optional side selector: leading, trailing, left, right, or both when supported. |
| stripCharacter | optional character to remove instead of whitespace. |
| Parameter | Description |
|---|---|
| res | text with selected leading or trailing characters removed. |
strip removes leading and trailing whitespace from text by default.
Optional arguments can select a side and the character to remove when supported by the string module.
txt = strip(" Nel Son ")
| Version | Description |
|---|---|
| 2.0.0 | initial version |