Trims open and closed elements either to the closest intersection in both directions or to the selected element.
Trim an element
Trim Corner command
Modifying 2D elements