[][src]Function mupdf_sys::fz_format_string

pub unsafe extern "C" fn fz_format_string(
    ctx: *mut fz_context,
    user: *mut c_void,
    emit: Option<unsafe extern "C" fn(ctx: *mut fz_context, user: *mut c_void, c: c_int)>,
    fmt: *const c_char,
    args: *mut __va_list_tag
)

Our customised 'printf'-like string formatter. Takes %c, %d, %s, %u, %x, as usual. Modifiers are not supported except for zero-padding ints (e.g. %02d, %03u, %04x, etc). %g output in "as short as possible hopefully lossless non-exponent" form, see fz_ftoa for specifics. %f and %e output as usual. %C outputs a utf8 encoded int. %M outputs a fz_matrix*. %R outputs a fz_rect*. %P outputs a fz_point*. %n outputs a PDF name (with appropriate escaping). %q and %( output escaped strings in C/PDF syntax. %l{d,u,x} indicates that the values are int64_t. %z{d,u,x} indicates that the value is a size_t.

user: An opaque pointer that is passed to the emit function.

emit: A function pointer called to emit output bytes as the string is being formatted.