# PetscStrbeginswith
Determines if a string begins with a certain string 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscStrbeginswith(const char a[], const char b[], PetscBool *flg)
```
Not Collective


## Input Parameters

- ***a -*** pointer to string
- ***b -*** string to begin with



## Output Parameter

- ***flg -*** PETSC_TRUE or PETSC_FALSE



## Fortran Note
Not for use in Fortran




## See Also
 `PetscStrendswithwhich()`, `PetscStrendswith()`, `PetscStrtoupper`, `PetscStrtolower()`, `PetscStrrchr()`, `PetscStrchr()`,
`PetscStrncmp()`, `PetscStrlen()`, `PetscStrncmp()`, `PetscStrcmp()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/str.c.html#PetscStrbeginswith">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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
