comint-next-prompt
comint-next-prompt is an interactive compiled Lisp function in `comint.el
'.
(comint-next-prompt N)
Move to end of Nth next prompt in the buffer.
If `comint-use-prompt-regexp' is nil, then this means the beginning of
the Nth next `input' field, otherwise, it means the Nth occurrence of
text matching `comint-prompt-regexp'.