trim, ltrim... sanitize methods + fix Extending docs

Hi!
I hope they will be useful.