We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8c35ca commit a637252Copy full SHA for a637252
1 file changed
library/core/src/char/methods.rs
@@ -597,9 +597,14 @@ impl char {
597
/// Returns the number of 16-bit code units this `char` would need if
598
/// encoded in UTF-16.
599
///
600
+ /// That number of code units is always either 1 or 2, for unicode scalar values in
601
+ /// the [basic multilingual plane] or [supplementary planes] respectively.
602
+ ///
603
/// See the documentation for [`len_utf8()`] for more explanation of this
604
/// concept. This function is a mirror, but for UTF-16 instead of UTF-8.
605
606
+ /// [basic multilingual plane]: http://www.unicode.org/glossary/#basic_multilingual_plane
607
+ /// [supplementary planes]: http://www.unicode.org/glossary/#supplementary_planes
608
/// [`len_utf8()`]: #method.len_utf8
609
610
/// # Examples
0 commit comments