Tulip Interview Question

Given a string find the longest substring that passes a certain function they supply you.