Updated likeString function