# PetscStringize
Stringize a token 
## Synopsis
```
#include <petscmacros.h>
const char* PetscStringize(x)
```

## Input Parameter

- ***x -*** The token you would like to stringize



## Output Parameter

- ***<return-*** value> - The string representation of x



## Notes
Not available from Fortran.

PetscStringize() expands x before stringizing it, if you do not wish to do so, use
PetscStringize_() instead.


## Example Usage
```none
  #define MY_OTHER_VAR hello there
  #define MY_VAR       MY_OTHER_VAR

  PetscStringize(MY_VAR)  -> "hello there"
  PetscStringize_(MY_VAR) -> "MY_VAR"

  int foo;
  PetscStringize(foo)  -> "foo"
  PetscStringize_(foo) -> "foo"
```





## See Also
 `PetscConcat()`, `PetscExpandToNothing()`, `PetscExpand()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscmacros.h.html#PetscStringize">include/petscmacros.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscmacros.h)


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