Skip to main content

format_printf

Function format_printf 

Source
pub fn format_printf(fmt: &str, args: &[Value]) -> Result<String, String>
Expand description

Formats args using a C-style fmt string.

Supported specifiers: %d %i %f %e %g %s %%. Flags: - (left-align), + (force sign), 0 (zero-pad), (space sign). Width and .precision follow standard C printf conventions. Escape sequences \n \t \\ are also processed.

Octave behaviour: if args is longer than the number of specifiers the format string is repeated until all args are consumed.