convert a few for-loop char finds to proper strchr and memchr