We discuss static, cylindrically symmetric vacuum solutions of hybrid metric-Palatini gravity (HMPG), a recently proposed theory that has been shown to successfully pass the local observational tests and produce a certain progress in cosmology. We use HMPG in its well-known scalar-tensor representation. The latter coincides with general relativity containing, as a source of gravity, a conformally coupled scalar field phi and a self-interaction potential V(phi). The phi field can be canonical or phantom, and, accordingly, the theory splits into canonical and phantom sectors. We seek solitonic (stringlike) vacuum solutions of HMPG, that is, completely regular solutions with Minkowski metric far from the symmetry axis, with a possible angular deficit. A transition of the theory to the Einstein conformal frame is used as a tool, and many of the results apply to the general Bergmann-Wagoner-Nordtvedt class of scalar-tensor theories as well as f(R) theories of gravity. One of these results is a one-to-one correspondence between stringlike solutions in the Einstein and Jordan frames if the conformal factor that connects them is everywhere regular. An algorithm for the construction of stringlike solutions in HMPG and scalar-tensor theories is suggested, and some examples of such solutions are obtained and discussed.