Fixes Issue 9699 - Implement generic strip/stripLeft/stripRight functions which accept an element or a predicate.