Merge pull request #1382 from AndrejMitrovic/Fix10510

Issue 10510 - enforce should take any callable function
Fixes Issue 9699 - Implement generic strip/stripLeft/stripRight functions which accept an element or a predicate.