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