PetscStrlcat#

Concatenates a string onto a given string, up to a given length

Synopsis#

#include "petscsys.h"   
PetscErrorCode PetscStrlcat(char s[], const char t[], size_t n)

Not Collective

Input Parameters#

  • s - pointer to string to be added to at end

  • t - string to be added

  • n - length of the original allocated string

Note#

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().

Fortran Note#

Not for use in Fortran

See Also#

PetscStrcpy(), PetscStrncpy(), PetscStrcat()

Level#

intermediate

Location#

src/sys/utils/str.c

Examples#

src/tao/constrained/tutorials/maros.c.html


Edit on GitLab

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages