For production code, I would look up Boyer-Moore and do that. But if I had to answer off the top of my head, based on my memoires of Boyer-Moore, the pseudo-code would look like:
Construct table(char-diff, offset) {offset by which to move test string b4 next text}
begin:
Compare (needle, haystack): if comparison false, lookup in above table to compute next offset.
Compare (needle, haystack[next-offset] if comparison still false AND we have not passed end of haystack, repeat.
Test which case: did we pass end, or find needle
return 0 if passed end, offset to needle in haystack otherwise.