Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (s) strncmp64(3)
NAME
strncmp64 - Compares two strings
LIBRARY
H-series and J-series native Guardian processes: implicit libraries
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <string.h>
int strncmp64(
const char_ptr64 *s1,
const char _ptr64 *s2,
unsigned long long n);
PARAMETERS
s1 Points to a location containing first string.
s2 Points to a location containing the second of two strings referenced.
n Species the maximum number of bytes to compare.
DESCRIPTION
The strncmp64() function compares the string pointed to by the s1 parameter to the string
pointed to by the s2 parameter. The sign of a nonzero value returned by strncmp64() is deter-
mined by the sign of the difference between the values of the first pair of bytes (both interpreted
as unsigned char) that differ in the two compared objects. The strncmp64() function compares
bytes until it has compared n bytes or until it reaches a terminating null byte.
The strncmp64() function compares strings based on the machine collating order. It does not use
the locale-dependent sorting order.
RETURN VALUES
Upon successful completion, the strncmp64() function returns an integer whose value is greater
than, equal to, or less than 0 (zero), according to whether the s1 string is greater than, equal to, or
less than the s2 string. When a successful comparison cannot be made, this function returns a
value of 0 (zero).
RELATED INFORMATION
Functions: strcat64(3), strcmp64(3), strcpy64(3), strncat64(3), strncpy64(3).
527192-018 Hewlett-Packard Company 6109