This could just use the `is_ascii()` method defined in `std::ascii`'.

~~~
if s.is_ascii() {
    ...
}
~~~