nckernel
0.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
slibc
src
strncmp.c
Go to the documentation of this file.
1
#include <
sys/types.h
>
2
#include <
stdio.h
>
3
#include <
string.h
>
4
5
int
strncmp
(
const
char
*s1,
const
char
*s2,
size_t
n)
6
{
7
while
(*s1 && *s2 && *s1 == *s2 && n > 0) {
8
n--;
9
s1++;
10
s2++;
11
}
12
13
return
n == 0 ? 0 : *s1 - *s2;
14
}
15
16
/* End of a file */
Generated on Thu Nov 7 2013 02:45:26 for nckernel by
1.8.4