Minor fix

- Fixed a regression in `string.trim()` and added a new assertion to the unit test
- Updated docblocks