Last change
on this file since c3aee8a was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
376 bytes
|
Rev | Line | |
---|
[f40a309] | 1 | /*
|
---|
| 2 | ============================================================================
|
---|
| 3 | index.c -- BSD style index function
|
---|
| 4 | Version 1 -- 1987-02-11 -- D.N. Lynx Crowe
|
---|
| 5 | ============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[7258c6a] | 8 | int8_t *index(int8_t *str, int8_t c)
|
---|
[f40a309] | 9 | {
|
---|
| 10 | while (*str) {
|
---|
| 11 |
|
---|
| 12 | if (*str == c)
|
---|
| 13 | return(str);
|
---|
| 14 |
|
---|
| 15 | ++str;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
[7258c6a] | 18 | return((int8_t *)0);
|
---|
[f40a309] | 19 | }
|
---|
| 20 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.