How to cancel a text that hasn't sent, before it does send?
Failed delivery of a message while in Airplane mode is represented by a Not Delivered subtext below the message text. To safely delete it without sending, simply tap and hold on the message, tap More..., select the message by tapping on the checkbox shown towards left and tap on Delete Message button.

  

Alternatively, delete the entire message thread by navigating back to list of messages, swiping left on conversation thread to reveal the Delete button and tapping Delete button shown at the bottom.