Думаю rtrim, ltrim, trim с масками не помешал бы
Merge pull request #1 from zamarawka/patch-1

Added rtrim, ltrim filters
Added mask to trim filters