WordPress has no conditional for substring testing but you can do this using PHPs built-in function: strpos()
global $post;
if( false !== strpos( $post->post_name, 'beef' ) ) {
// Do Things
}
The above returns true if beef
is found somewhere in the post slug.