This module provides shortcuts to substr($string,0,$number) (trim) and a one-liner regex replacement (strim). OK, why not?
But: The implementation of trim doesn't simply use substr but splits the string to an array and returns the joined first $number of it's elements. This works but is VERY slow (140 times slower than substr on a 30-char string). strim could be implemented simpler (and faster) without reversing the string twice by tweaking the used regex a bit.