Subtract from Text

Is there a way to subtract text from a textfield?

ex:
myTextBox.text = “This is a test”;
myTextBox.text -= " test";
// I’d like to return “This is a”

Is this possible?