Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

Guardian Native C Library Calls (s) strncasecmp(3)
NAME
strncasecmp - Compares two strings, ignoring case
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL
G-series native OSS processes: /G/system/sysnn/zstfnsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <strings.h>
int strncasecmp(const char *
s1,
const char *s2,
size_t n);
PARAMETERS
s1 Is a pointer to the rst string to be compared.
s2 Is a pointer to the second string to be compared.
n Is the maximum number of bytes of the rst string that strncasecmp() will com-
pare to the second string.
DESCRIPTION
The strncasecmp() function performs a case-insensitive comparison of the strings pointed to by
the s1 and s2 parameters. The strncasecmp() function is similar to the strcasecmp() function,
but compares, at most, the rst n bytes of the two strings.
NOTES
The strncasecmp() function can be called by native processes only.
In the POSIX locale, this function rst converts uppercase characters to lowercase, then per-
forms byte comparisons. Its behavior in other locales is undened.
RETURN VALUES
If the rst n bytes of the string pointed to by s1 is, ignoring case, greater than the rst n bytes of
the string pointed to by s2, the strncasecmp() function returns an integer greater than 0 (zero).
If the rst n bytes of the string pointed to by s1 is, ignoring case, less than the rst n bytes of the
string pointed to by s2, strncasecmp() returns an integer less than 0 (zero). If the rst n bytes of
the string pointed to by s1 is, ignoring case, equal to the rst n bytes of the string pointed to by
s2, the strncasecmp() function returns 0 (zero).
ERRORS"
None. This function does not set errno.
RELATED INFORMATION
Functions: strcasecmp(3).
STANDARDS CONFORMANCE
The strncasecmp() function is dened in the XPG4 Version 2 specication.
527192-005 Hewlett-Packard Company 667