Skip to main content
`Ctrl`+`K`

# PetscViewerStringGetStringRead

Returns the string that a `PETSCVIEWERSTRING` uses

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscViewerStringGetStringRead(PetscViewer viewer, const char *string[], size_t *len) PeNS

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 not need it

## Note

Do not write to the string nor free it

## Fortran Note

Copies the current contents of the `PETSCVIEWERSTRING` viewer string

## See Also

Viewers: Looking at PETSc Objects, `PetscViewerStringOpen()`, `PETSCVIEWERSTRING`, `PetscViewerStringSetString()`, `PetscViewerStringSPrintf()`, `PetscViewerStringSetOwnString()`

## Level

advanced

## Location

src/sys/classes/viewer/impls/string/stringv.c

## Examples

src/ts/tutorials/ex3.c

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