# PetscViewerStringGetStringRead
Returns the string that a `PETSCVIEWERSTRING` uses 
## Synopsis
```
#include "petscsys.h"  
PetscErrorCode PetscViewerStringGetStringRead(PetscViewer viewer, const char *string[], size_t *len)
```
Logically Collective


## Input Parameter

- ***viewer -*** `PETSCVIEWERSTRING` viewer



## Output Parameters

- ***string -*** the string, optional use NULL if you do not need
- ***len -*** the length of the string, optional use NULL if you do





## Note
Do not write to the string nor free it


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

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex3.c.html">src/ts/tutorials/ex3.c.html</A><BR>


---
[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)  
