Module format

Module format 

Source
Expand description

Shared formatting helpers for string-producing builtins.

Structs§

ArgCursor
Stateful cursor over formatting arguments.
FormatStepResult
Result of formatting a string with the current cursor state.

Functions§

decode_escape_sequences
Decode MATLAB-compatible escape sequences within a format specification.
extract_format_string
Extract a printf-style format string from a MATLAB value, validating that it is a character row vector or string scalar.
flatten_arguments
Flatten MATLAB argument values into a linear vector suitable for repeated printf-style formatting. Arrays are traversed in column-major order and GPU tensors are gathered back to the host.
format_variadic
Format a MATLAB-style format string with the provided arguments.
format_variadic_with_cursor
Format a string using the supplied cursor, returning the formatted text along with the number of arguments consumed during this pass.