Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // linear search
- int indexOf(const char needle, const char* haystack, int haystackSize, int startSearch) {
- for(int i = startSearch; i < haystackSize; i++) {
- if(haystack[i] == needle)
- return i;
- }
- return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement