G2A Many GEOs

indexOf in C++

mvaganov Dec 17th, 2014 166 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  2. // linear search
  3. int indexOf(const char needle, const char* haystack, int haystackSize, int startSearch) {
  4.         for(int i = startSearch; i < haystackSize; i++) {
  5.                 if(haystack[i] == needle)
  6.                         return i;
  7.         }
  8.         return -1;
  9. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand