PetscStrlen#

Gets length of a string

Synopsis#

#include "petscsys.h"   
PetscErrorCode PetscStrlen(const char s[], size_t *len)

Not Collective

Input Parameters#

  • s - pointer to string

Output Parameter#

  • len - length in bytes

Note#

This routine is analogous to strlen().

Null string returns a length of zero

Fortran Note#

Not for use in Fortran

See Also#

PetscStrallocpy()

Level#

intermediate

Location#

src/sys/utils/str.c

Examples#

src/ts/tutorials/ex18.c.html


Edit on GitLab

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