check substring

hi everyone

I have a C program where I have a line and I want to check if the line contains a string.The line is stored in a buffer.How can I do that?
Can I consider the whole line as a string and check for a substring?And if so what's the most efficient way to achieve it?

You can hold the whole line as a string and use strstr() function. But I am not sure that it is the most efficient way of doing that!