strcasecmp, strncasecmp - compare two strings ignoring case


   #include <strings.h>

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

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


   The  strcasecmp()  function  performs  a byte-by-byte comparison of the
   strings s1 and s2, ignoring the case of the characters.  It returns  an
   integer  less  than,  equal  to,  or  greater than zero if s1 is found,
   respectively, to be less than, to match, or be greater than s2.

   The strncasecmp() function is similar, except that it compares no  more
   than n bytes of s1 and s2.


   The  strcasecmp()  and  strncasecmp()  functions return an integer less
   than, equal to, or greater than zero if s1  is,  after  ignoring  case,
   found to be less than, to match, or be greater than s2, respectively.


   For   an   explanation   of   the  terms  used  in  this  section,  see

   Interface                    Attribute      Value          
   strcasecmp(), strncasecmp()  Thread safety  MT-Safe locale 


   4.4BSD, POSIX.1-2001, POSIX.1-2008.


   The strcasecmp() and strncasecmp() functions first appeared in  4.4BSD,
   where   they  were  declared  in  <string.h>.   Thus,  for  reasons  of
   historical  compatibility,  the  glibc  <string.h>  header  file   also
   declares these functions, if the _DEFAULT_SOURCE (or, in glibc 2.19 and
   earlier, _BSD_SOURCE) feature test macro is defined.

   The POSIX.1-2008 standard says of these functions:

          When the LC_CTYPE category of the locale being used is from  the
          POSIX locale, these functions shall behave as if the strings had
          been  converted  to  lowercase  and  then  a   byte   comparison
          performed.  Otherwise, the results are unspecified.


   bcmp(3),   memcmp(3),  strcmp(3),  strcoll(3),  string(3),  strncmp(3),
   wcscasecmp(3), wcsncasecmp(3)


   This page is part of release 4.09 of the Linux  man-pages  project.   A
   description  of  the project, information about reporting bugs, and the
   latest    version    of    this    page,    can     be     found     at

                              2016-07-17                     STRCASECMP(3)

More Linux Commands

set_field_pad(3form) - color and attribute control for form
The function set_field_fore sets the foreground attribute of field. This is the highlight used to display the field contents. The function field_fore returns th

cabsl(3) - absolute value of a complex number (Man Page)....
The cabs() function returns the absolute value of the complex number z. The result is a real number. VERSIONS These functions first appeared in glibc in version

XSetBackground(3) - GC convenience routines - Linux man page
The XSetState function sets the foreground, background, plane mask, and function components for the specified GC. XSetState can generate BadAlloc, BadGC, and Ba

glVertex(3gl) - specify a vertex (Library - Linux man page)
glVertex commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices. The current color, normal, and texture coordinates are assoc

XpStartDoc(3x) - Indicates the beginning of a print document
XpStartDoc signals the beginning of a new print document. If type is XPDocRaw, then the client will provide all the data for the resulting document using XpPutD

gnutls_openpgp_crt_get_subkey_usage(3) - API function.......
This function will return certificates key usage, by checking the key algorithm. The key usage value will ORed values of GNUTLS_KEY_DIGITAL_SIGNATURE or GNUTLS_

mpartition(1) - partition an MSDOS hard disk (Man Page).....
The mpartition command is used to create MS-DOS file systems as partitions. This is intended to be used on non-Linux systems, i.e. systems where fdisk and easy

edata(3) - end of program segments - Linux manual page......
The addresses of these symbols indicate the end of various program segments: etext This is the first address past the end of the text segment (the program code)

lvmdump(8) - create lvm2 information dumps for diagnostic pu
lvmdump is a tool to dump various information concerning LVM2. By default, it creates a tarball suitable for submission along with a problem report. The content

glColorPointer(3gl) - define an array of colors (Man Page)
glColorPointer specifies the location and data of an array of color components to use when rendering. size specifies the number of components per color, and mus

mkfs.fat(8) create an MS-DOS filesystem under Linux.........
mkfs.fat is used to create an MS-DOS filesystem under Linux on a device (usually a disk partition). device is the special file corresponding to the device (e.g

ldap_is_ldap_url(3) - LDAP Uniform Resource Locator routines
These routines support the use of LDAP URLs (Uniform Resource Locators) as detailed in RFC 4516. LDAP URLs look like this: ldap://hostport/dn[?attrs[?scope[?fil

We can't live, work or learn in freedom unless the software we use is free.