blanks
Create character array of blanks
Syntax
Description
Note
pad
is recommended over
blanks
because it provides greater flexibility and
allows vectorization. For additional information, see Alternative Functionality.
chr = blanks(
returns a
n
)1
-by-n
array of space characters.
Examples
Input Arguments
Alternative Functionality
Update code that makes use of blanks
to use pad
instead. Unlike blanks
, which creates a new
character vector of whitespace characters, pad
adds whitespace
characters to an existing piece of text and returns the same data-type as the input. For
example:
Not Recommended | Recommended |
---|---|
str = blanks(5) str = ' ' |
str = pad("",5) str = " " |
Extended Capabilities
Version History
Introduced before R2006a