For iOS 7 and 8 pull down from the center of the any home screen to open the search bar.
In iOS 6 start with opening the search bar.
Then a box that says undo typing or whatever action you did last should appear.
Then it will undo the your last action that can be undone.
Then for both iOS 6, 7 and 8 type whatever you want to then if you type something wrong shake the device.
It works is many Apple apps and features.
And third-party apps.
- iPad or iPhone
- iOS 6, 7 or 8