Closed
Description
Feature gate: #![feature(const_slice_is_ascii)]
This is a tracking issue for [u8]::is_ascii
being a const fn
.
UTF-8 checking in const fn
stabilized back in 1.63 (#97367), but apparently somehow simpler ASCII checking was never const-ified.
Public API
// core::slice
impl [u8] {
const fn is_ascii(&self) -> bool;
}
// core::str
impl str {
const fn is_ascii(&self) -> bool;
}
Steps / History
- Implementation: Constify
[u8]::is_ascii
(unstably) #111222 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.