PetscStrlen#

Gets the length of a string

Synopsis#

static inline PetscErrorCode PetscStrlen(const char s[], size_t *len)

Not Collective, No Fortran Support

Input Parameter#

  • s - pointer to string

Output Parameter#

  • len - length in bytes

Notes#

This routine is analogous to strlen(). NULL string returns a length of zero.

See Also#

PetscStrallocpy()

Level#

intermediate

Location#

include/petscstring.h

Examples#

src/ts/tutorials/ex18.c
src/ts/tutorials/ex48.c


Edit on GitLab

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