string: update *trim to use `is_whitespace`