How can quickly I check if a curve intersects with a line that goes from A to B and only check if it intersects between A and B?

The LineCurveIntersection intersects with an infinite line. Is there a “FiniteLineCurveIntersection” option that I don’t know, or do I have to write an evaluation to find out if the coordinates of the intersection is larger or smaller than A or B?

I need the check to be as fast as possible since I work on a mesh splitter that doesn’t fail if the curve runs right through a mesh’s vertice.

Thanks.