Why doesn't this exist? There is a nice little is_ascii method but no way to extract the result (that I can see).
1 Like
Can you cast char as u8 after checking it's ASCII? ASCII is a subset of UTF-8, so it doesn't need any fancy conversion.
Aha, I forgot that char is a fundamental type and was looking for a TryFrom implementation.
This question is better asked on users.rust-lang.org
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.