Navigation

Operators and Keywords

Function List:

C++ API

: deblank (s)

Remove trailing whitespace and nulls from s.

If s is a matrix, deblank trims each row to the length of longest string. If s is a cell array of strings, operate recursively on each string element.

Examples:

deblank ("    abc  ")
     ⇒  "    abc"

deblank ([" abc   "; "   def   "])
     ⇒  [" abc  " ; "   def"]

See also: strtrim.

Package: octave