Navigation

Operators and Keywords

Function List:

C++ API

: val = string_fill_char ()
: old_val = string_fill_char (new_val)
: string_fill_char (new_val, "local")

Query or set the internal variable used to pad all rows of a character matrix to the same length.

The value must be a single character and the default is " " (a single space). For example:

string_fill_char ("X");
[ "these"; "are"; "strings" ]
     ⇒  "theseXX"
         "areXXXX"
         "strings"

When called from inside a function with the "local" option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.

Package: octave