Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ string(3) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bstring(3)

malloc(3C)

string(3C)

strings(5)

string(3)               (BSD Compatibility Package)               string(3)

NAME
     string: strcasecmp, strncasecmp - case-insensitive string comparisons

SYNOPSIS
     /usr/ucb/cc [flag ...] file ... -lucb

     #include <strings.h>

     int strcasecmp(const char *s1, const char *s2);

     int strncasecmp(const char *s1, const char *s2, sizet n);

DESCRIPTION
     The strcasecmp() function compares, while ignoring differences in
     case, the string pointed to by s1 to the string pointed to by s2. The
     strncasecmp() function compares, while ignoring differences in case,
     not more than n bytes from the string pointed to by s1 to the string
     pointed to by s2.

     These functions assume the ASCII character set when equating lower and
     upper case characters. In the POSIX locale, strcasecmp() and
     strncasecmp() do upper to lower conversions, then a byte comparison.
     The results are unspecified in other locales.

     These functions operate on null-terminated strings. They do not check
     for overflow of any receiving string.

RETURN VALUE
     Upon completion, strcasecmp() returns an integer greater than, equal
     to or less than 0, if the string pointed to by s1 is, ignoring case,
     greater than, equal to or less than the string pointed to by s2
     respectively.

     Upon successful completion, strncasecmp() returns an integer greater
     than, equal to or less than 0, if the possibly null-terminated array
     pointed to by s1 is, ignoring case, greater than, equal to or less
     than the possibly null-terminated array pointed to by s2 respectively.

SEE ALSO
     bstring(3), malloc(3C), string(3C), strings(5).















Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026