Check if string contains substring in C++
Given two strings, A and B, output true if B is a substring of A and false otherwise. The first line contains the number of test cases T. This is followed by T lines each consisting of pairs of binary strings A and B.