:orphan: # PetscStrcpy Copies a string ## Synopsis ``` #include "petscsys.h" PetscErrorCode PetscStrcpy(char s[], const char t[]) ``` Not Collective, No Fortran Support ## Input Parameter - ***t -*** pointer to string ## Output Parameter - ***s -*** the copied string (since 3.18.5) ## Notes It is recommended you use `PetscStrncpy()` (equivalently `PetscArraycpy()` or `PetscMemcpy()`) instead of this routine. `NULL` strings returns a string starting with zero. ## See Also `PetscStrncpy()` ## Level deprecated ## 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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)