Any blockers for making some str functions const?

Are there any reasons why trim, for example, isn't const?

1 Like

trim is implemented using trim_matches, which uses the Pattern trait. Traits can't be const stable. Could you do it unstably? Probably.

OK, so no technically no blockers. Just difficult or unwanted because the implementation will be more complex.