Booking.com interview question

Create a method that finds if a stringA is a substring of stringB without using substring method of NSString.