Changeset 5832e9b in mainline for uspace/lib/libc/generic/string.c
- Timestamp:
- 2007-12-13T00:04:16Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc76be3
- Parents:
- 9119d25
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/string.c
r9119d25 r5832e9b 145 145 } 146 146 147 int strncmp(const char *a, const char *b, size_t n) 148 { 149 size_t c = 0; 150 151 while (c < n && a[c] && b[c] && (!(a[c] - b[c]))) 152 c++; 153 154 return ( c < n ? a[c] - b[c] : 0); 155 156 } 147 157 148 158 /** Return pointer to the first occurence of character c in string
Note:
See TracChangeset
for help on using the changeset viewer.