Pregunta de entrevista de Tulip

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