1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.2.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>STD_CompareNString</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">STD_CompareNString <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16<dl> 17 <dd><PRE><CODE>#include <nitro/std.h> 18 19int STD_CompareNString( const char* str1, const char* str2, int len );</CODE></PRE> 20 <PRE><CODE>int STD_StrNCmp( const char* str1, const char* str2, int len ); 21</CODE></PRE></dd> 22</dl> 23 24<h2>Arguments</h2> 25<table border="1" width="100%"> 26 <tbody> 27 <TR> 28 <TD width="200"><EM><STRONG><FONT face="Courier New">str1</FONT></STRONG></EM></TD> 29 <TD width="800">Specifies the pointer to the compared string.</TD> 30 </TR> 31 <TR> 32 <TD width="200"><EM><STRONG><FONT face="Courier New">str2</FONT></STRONG></EM></TD> 33 <TD width="800">Specifies the pointer to the compared string.</TD> 34 </TR> 35 <TR> 36 <TD width="200"><EM><STRONG><FONT face="Courier New">len</FONT></STRONG></EM></TD> 37 <TD width="800">Specifies the number of characters to compare.</TD> 38 </TR> 39 </tbody> 40</table> 41 42<h2>Return Values</h2> 43<p> 44Returns 0 if the compared strings are the same. 45</p> 46 47<H2>Description</H2> 48<P> 49Compares only the initial <EM><STRONG><CODE>len</CODE></STRONG></EM> character in charstring <EM><STRONG><CODE>str1</CODE></STRONG></EM> and charstring <EM><STRONG><CODE>str2</CODE></STRONG></EM>. The C standard function carries out the same operation as <CODE>strncmp()</CODE>.</P> 50<p><CODE>STD_StrNCmp()</CODE> is defined as another name for <CODE>STD_StrCompareNString()</CODE>.</p> 51 52<h2>See Also</h2> 53<p><CODE><A href="STD_CompareString.html">STD_CompareString</A>, <A href="STD_CompareLString.html">STD_CompareLString</A></CODE></p> 54 55<H2>Revision History</H2> 56<P> 572005/10/05 Initial version. 58</P> 59<hr><p>CONFIDENTIAL</p></body> 60</html> 61