Midi Quantize Length

From the manual:

Quantizing MIDI Event Ends
The “Quantize MIDI Event Ends” function on the Edit menu, Advanced Quantize submenu, moves the ends of your MIDI notes to the nearest grid positions, taking the Quantize pop-up menu setting into account.

I recommend checking the manual because cubase offers quite a bit in terms of quantizing