Hello Every one

I want to trim a line using a Boundary line shown in the picture.
here is my plan to do it..

'get the boundary line
.... okay
'get the line to be trimmed.
.... okay

'get the intersection line
.... okay

'isolate(get) the portion of the entity after intersection
.... how to do this???

'delete the isolated entity
.... okay