strcmp.html 688 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <html>
  2. <head>
  3. <title>strcmp</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>strcmp</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. strcmp - compare strings
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;string.h&gt;<br>
  13. <br>
  14. int<br>
  15. strcmp(const char *<em>str1</em>, const char *<em>str2</em>);
  16. <h3>Description</h3>
  17. The two strings <em>str1</em> and <em>str2</em> are compared
  18. lexicographically.
  19. <h3>Return Values</h3>
  20. If <em>str1</em> sorts before <em>str2</em>, -1 is returned.
  21. <p>
  22. If <em>str1</em> sorts after <em>str2</em>, 1 is returned.
  23. <p>
  24. If <em>str1</em> is the same as <em>str2</em>, 0 is returned.
  25. <p>
  26. </body>
  27. </html>