petsc-3.10.5 2019-03-28
Report Typos and Errors

# PetscStrncmp

Compares two strings, up to a certain length

### Synopsis

    #include "petscsys.h"
    PetscErrorCode  PetscStrncmp(const char a[],const char b[],size_t n,PetscBool  *t)

Not Collective

### Input Parameters

| a | - pointer to first string
| b | - pointer to second string
| n | - length to compare up to

### Output Parameter

t -if the two strings are equal

### Notes

Not for use in Fortran

### See Also

PetscStrgrt(), PetscStrcmp(), PetscStrcasecmp()

### Level

intermediate

### Location

src/sys/utils/str.c

### Examples

src/dm/field/examples/tutorials/ex1.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages