/
ColdC/Functions/
ColdC/Structure/
<head><title>ColdC: Function/Method Reference: strcmp()</title></head>

<body>

<h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: strcmp()</h1>

<hr>

<p>
<font size=+1><i>INTEGER</i> <b>strcmp</b>(<i>STRING <b>str1</b>, STRING <b>str2</b></i>)</font>

<p>This function compares <VAR>str1</VAR> against <VAR>str2</VAR> and returns
zero if they are equal, greater than zero if <VAR>string1</VAR> is lexically
greater than <VAR>string2</VAR>, and less than zero if <VAR>string1</VAR> is
lexically less than <VAR>string2</VAR>.  The comparison performed by  
<CODE>strcmp()</CODE> is case-sensitive.

<p>Examples:

<blockquote>  
<PRE>
strcmp("Foo", "bar")
=&gt; -28

strcmp("cashmir", "cashmiR")
=&gt; 32

strcmp("foo", "foo")
=&gt; 0
</PRE>
</blockquote>

<p><hr size=4><p align=center><i>Last Modified on 24 Mar 1996</i>
<br><i>Copyright &copy; 1995, 1996, Brandon Gillespie</i>
</body>