What are the antonyms of "append" and "prepend"?

I need the antonyms for "append" (that is, I need a word that means "to remove at the end", since "append" means "to add at the end") and "prepend" (that is, I need a word that means "to remove at the beginning", since "prepend" means "to add at the beginning"). Do those words exist?

Would it be possible to use "behead" in a general context or is it limited to killing somebody?


Solution 1:

You could top and tail something.

to cut off the hard parts at each end of a fruit or vegetable when you prepare it for cooking: Top and tail the beans.

One can do this with gooseberries and runner beans and so forth, so I can't see why you shouldn't do it to something else.

Solution 2:

"Truncate" means to remove part of something, usually at the end.