Tracking Issue for char_max_len · Issue #121714 · rust-lang/rust (original) (raw)

Feature gate: #![feature(char_max_len)]

This is a tracking issue for #45795.

Public API

// core::char

impl char { pub const MAX_LEN_UTF8: usize = 4; pub const MAX_LEN_UTF16: usize = 2; }

pub const MAX_LEN_UTF8: usize = char::MAX_LEN_UTF8; pub const MAX_LEN_UTF16: usize = char::MAX_LEN_UTF16;

Steps / History

Notes for Stabilization

When stabilizing this, the documentation for the char::encode_utf8 function should be
adjusted to include these constants.

Unresolved Questions

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html