Skip to main content
`Ctrl`+`K`

# PetscStrchr

Locates first occurrence of a character in a string

## Synopsis

    static inline PetscErrorCode PetscStrchr(const char a[], char b, char *c[]) PeNS

Not Collective, No Fortran Support

## Input Parameters

- a - pointer to string

- b - character

## Output Parameter

- c - location of occurrence, `NULL` if not found

## See Also

`PetscStrrchr()`, `PetscTokenCreate()`, `PetscStrendswith()`, `PetscStrbeginsswith()`

## Level

intermediate

## Location

include/petscstring.h

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