:orphan: # PetscStrbeginswith Determines if a string begins with a certain string ## Synopsis ``` static inline PetscErrorCode PetscStrbeginswith(const char a[], const char b[], PetscBool *flg) ``` Not Collective, No Fortran Support ## Input Parameters - ***a -*** string to search - ***b -*** string to begin with ## Output Parameter - ***flg -*** `PETSC_TRUE` if `a` begins with `b`, `PETSC_FALSE` otherwise ## Notes Both `a` and `b` may be `NULL` (in which case `flg` is set to `PETSC_FALSE`) but not either. `a` and `b` may point to the same string. ## See Also `PetscStrendswithwhich()`, `PetscStrendswith()`, `PetscStrtoupper`, `PetscStrtolower()`, `PetscStrrchr()`, `PetscStrchr()`, `PetscStrncmp()`, `PetscStrlen()`, `PetscStrcmp()` ## Level intermediate ## Location include/petscstring.h --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscstring.h) [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)