# PetscBasename returns a pointer to the last entry of a / or \ separated directory path ## Synopsis ``` #include "petscsys.h" const char *PetscBasename(const char a[]) ``` Not Collective ## Input Parameter - ***a -*** pointer to string ## Fortran Note Not for use in Fortran ## See Also `PetscStrgrt()`, `PetscStrncmp()`, `PetscStrcasecmp()`, `PetscStrrchr()`, `PetscStrcmp()`, `PetscStrstr()`, `PetscTokenCreate()`, `PetscStrToArray()`, `PetscStrInList()` ## Level intermediate ## Location src/sys/utils/str.c --- [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)