Verify if substring is found in string

Hi,

I'm new to HP-UNIX programming(previously using C++). I am looking for an IF statement which would return TRUE if a substring is found in a string.

For example, if 'header' is found in 'header_cp', the IF statement will result to true.

Would appreciate any help...

One way of many:

echo header_cp| grep -q header > /dev/null 2>&1
if [[ $? != 0 ]]; then
     echo false
else
     echo true
fi