:orphan:
# PetscStrlcat
Concatenates a string onto a given string, up to a given length 
## Synopsis
```
static inline PetscErrorCode PetscStrlcat(char s[], const char t[], size_t n)
```
Not Collective, No Fortran Support


## Input Parameters

- ***s -*** pointer to string to be added to at end
- ***t -*** string to be added
- ***n -*** length of the original allocated string





## Notes
Unlike the system call `strncat()`, the length passed in is the length of the
original allocated space, not the length of the left-over space. This is
similar to the BSD system call `strlcat()`.


## See Also
 `PetscStrncpy()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscstring.h.html#PetscStrlcat">include/petscstring.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/maros.c.html">src/tao/constrained/tutorials/maros.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex18.c.html">src/ts/tutorials/ex18.c</A><BR>


---
[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)  
