Can you subtract strings?

Is there a way to subtract the last three characters of a string?
I never understood why there wasn't a - operator for strings.

Anyway, you can use the substr function:

 
foo = foo.substr(0,foo.length() - 3);
Topic archived. No new replies allowed.