kill-rectangle

kill-rectangle is an interactive autoloaded compiled Lisp function in `rect.el'.

It is bound to C-x r k.

(kill-rectangle START END &optional FILL)

Delete the region-rectangle and save it as the last killed one.

When called from a program the rectangle's corners are START and END.
You might prefer to use `delete-extract-rectangle' from a program.

With a prefix (or a FILL) argument, also fill lines where nothing has to be
deleted.

If the buffer is read-only, Emacs will beep and refrain from deleting
the rectangle, but put it in the kill ring anyway. This means that
you can use this command to copy text from a read-only buffer.
(If the variable `kill-read-only-ok' is non-nil, then this won't
even beep.)