Is there an undo command on the iPhone?

Episode 1474 (19:46)

Rob from Lolo, MT
iPhone Undo Typing

Rob has a friend who's computer died. She tried to use her iPhone to type something and she hit the space bar and it disappeared. How can she get it back? Leo says it may be possible to get it back by shaking the phone. The iPhone has a feature that if she shakes the phone, a popup will appear that says "undo typing?" But the text must be available in the clipboard for that to work.