Brocade interview question

write code to find sub string