Mesh: Character Hair overlayed with a helmet

I’m currently searching for an easy way to overlay a character mesh (hair) with a helmet. Naturally i would like the helmet to “limit” the hair, kinda overwrite it, while the hair should still visible on the sides of the head.
Is there any common technique to do so, or do i have to create individual hair meshes for each helmet type?