OAR

RTEMS GNU Tools On-Line Library


strncmp

PREV UP NEXT Bookshelf

4.23: strncmp---character string compare

Synopsis

#include <string.h>
int strncmp(const char *a, const char * b, size_t length);

Description
strncmp compares up to length characters from the string at a to the string at b.


Returns
If *a sorts lexicographically after *b, strncmp returns a number greater than zero. If the two strings are equivalent, strncmp returns zero. If *a sorts lexicographically before *b, strncmp returns a number less than zero.


Portability
strncmp is ANSI C.

strncmp requires no supporting OS subroutines.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.