:orphan:
# PetscStrInList
search for a string in character-delimited list 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscStrInList(const char str[], const char list[], char sep, PetscBool *found)
```
Not Collective; No Fortran Support


## Input Parameters

- ***str -*** the string to look for
- ***list -*** the list to search in
- ***sep -*** the separator character



## Output Parameter

- ***found -*** whether `str` is in `list`





## See Also
 `PetscTokenCreate()`, `PetscTokenFind()`, `PetscStrcmp()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/str.c.html#PetscStrInList">src/sys/utils/str.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/utils/str.c)


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