Optimize code and add unit test for UTF->strpos() (Issue #495)