Skip to main content
`Ctrl`+`K`

# PetscSNPrintfCount

Prints to a string of given length, returns count of characters printed

## Synopsis

    PetscErrorCode PetscSNPrintfCount(char str[], size_t len, const char format[], size_t *countused, ...)

Not Collective, No Fortran Support

## Input Parameters

- len - the length of `str`

- format - the usual `printf()` format string

- … - args to format

## Output Parameters

- str - the resulting string

- countused - number of characters printed

## See Also

`PetscSynchronizedFlush()`, `PetscSynchronizedFPrintf()`, `PetscFPrintf()`, `PetscVSNPrintf()`, `PetscPrintf()`, `PetscViewerASCIIPrintf()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscSNPrintf()`, `PetscVFPrintf()`

## Level

intermediate

## Location

src/sys/fileio/mprint.c

## Examples

src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex11.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages