Just a note; $mid() has that $calc() functionality built in, for example:

Code:
//echo -a $mid(hello world, 2, -2)