*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> strcmp (9r)              
Title
Content
Arch
Section
 

strcmp(9r)

Contents


NAME    [Toc]    [Back]

       strcmp  -  General: Compares two null-terminated character
       strings

SYNOPSIS    [Toc]    [Back]

       int strcmp(
               char *s1,
               char *s2 );

ARGUMENTS    [Toc]    [Back]

       Specifies a pointer to a string (an  array  of  characters
       terminated by a null character).  Specifies a pointer to a
       string (an array of characters terminated by a null  character).

DESCRIPTION    [Toc]    [Back]

       The strcmp routine lexicographically compares string s1 to
       string s2. The routine does not  continue  the  comparison
       beyond  the  first  null character it finds. A fatal error
       occurs if you call strcmp with strings that are  not  null
       terminated.

RETURN VALUES    [Toc]    [Back]

       If  string  s1  is  less than string s2, strcmp returns an
       integer less than zero.  If s1 and s2 are equal, the  routine
 returns the value 0 (zero). If s1 is greater than s2,
       it returns an integer greater than zero.

SEE ALSO    [Toc]    [Back]

      
      
       Routines: bcmp(9r)



                                                       strcmp(9r)
[ Back ]
 Similar pages
Name OS Title
strcpy Tru64 General: Copies a null-terminated character string
copystr Tru64 General: Copies a null-terminated character string with a specified limit
strncpy Tru64 General: Copies a null-terminated character string with a specified limit
bcmp Tru64 General: Compares two byte strings
strncmp Tru64 General: Compares two strings, using a specified number of characters
copyinstr Tru64 General: Copies a null-terminated string from a user address space to a kernel address space
copyoutstr Tru64 General: Copies a null-terminated string from a kernel address space to a user address space
strcoll Tru64 Compares strings using locale collation
XmStringCompare HP-UX A compound string function that compares two strings
XmStringCompare Tru64 A compound string function that compares two strings
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service