question1_8, isSubstring helper function