Rearrange source to better match the doc order.
Expose `trim`, `trimLeft`, and `trimRight`.