# PetscViewerStringSPrintf
Prints information to a `PETSCVIEWERSTRING` `PetscViewer` object 
## Synopsis
```
#include "petscsys.h"  
PetscErrorCode PetscViewerStringSPrintf(PetscViewer viewer, const char format[], ...)
```
Logically Collective; No Fortran Support


## Input Parameters

- ***v -*** a string `PetscViewer`, formed by `PetscViewerStringOpen()`
- ***format -*** the format of the input





## Note
Though this is collective each MPI rank maintains a separate string


## See Also
 [](sec_viewers), `PETSCVIEWERSTRING`, `PetscViewerStringOpen()`, `PetscViewerStringGetStringRead()`, `PetscViewerStringSetString()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/string/stringv.c.html#PetscViewerStringSPrintf">src/sys/classes/viewer/impls/string/stringv.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/string/stringv.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
