@@ -29,11 +29,11 @@ impl char {
29
29
pub const REPLACEMENT_CHARACTER : char = '\u{FFFD}' ;
30
30
31
31
/// The version of [Unicode](https://www.unicode.org/) that the Unicode parts of
32
- /// `char` and [ `str`] methods are based on.
32
+ /// `char` and `str` methods are based on.
33
33
///
34
34
/// New versions of Unicode are released regularly and subsequently all methods
35
35
/// in the standard library depending on Unicode are updated. Therefore the
36
- /// behavior of some `char` and [ `str`] methods and the value of this constant
36
+ /// behavior of some `char` and `str` methods and the value of this constant
37
37
/// changes over time. This is *not* considered to be a breaking change.
38
38
///
39
39
/// The version numbering scheme is explained in
@@ -42,7 +42,7 @@ impl char {
42
42
pub const UNICODE_VERSION : ( u8 , u8 , u8 ) = crate :: unicode:: UNICODE_VERSION ;
43
43
44
44
/// Creates an iterator over the UTF-16 encoded code points in `iter`,
45
- /// returning unpaired surrogates as [ `Err`] s.
45
+ /// returning unpaired surrogates as `Err`s.
46
46
///
47
47
/// # Examples
48
48
///
@@ -70,7 +70,7 @@ impl char {
70
70
/// );
71
71
/// ```
72
72
///
73
- /// A lossy decoder can be obtained by replacing [ `Err`] results with the replacement character:
73
+ /// A lossy decoder can be obtained by replacing `Err` results with the replacement character:
74
74
///
75
75
/// ```
76
76
/// use std::char::{decode_utf16, REPLACEMENT_CHARACTER};
@@ -93,7 +93,7 @@ impl char {
93
93
super :: decode:: decode_utf16 ( iter)
94
94
}
95
95
96
- /// Converts a [ `u32`] to a `char`.
96
+ /// Converts a `u32` to a `char`.
97
97
///
98
98
/// Note that all `char`s are valid [`u32`]s, and can be cast to one with
99
99
/// [`as`](keyword.as.html):
@@ -106,7 +106,7 @@ impl char {
106
106
/// ```
107
107
///
108
108
/// However, the reverse is not true: not all valid [`u32`]s are valid
109
- /// `char`s. `from_u32()` will return [ `None`] if the input is not a valid value
109
+ /// `char`s. `from_u32()` will return `None` if the input is not a valid value
110
110
/// for a `char`.
111
111
///
112
112
/// For an unsafe version of this function which ignores these checks, see
@@ -126,7 +126,7 @@ impl char {
126
126
/// assert_eq!(Some('❤'), c);
127
127
/// ```
128
128
///
129
- /// Returning [ `None`] when the input is not a valid `char`:
129
+ /// Returning `None` when the input is not a valid `char`:
130
130
///
131
131
/// ```
132
132
/// use std::char;
@@ -141,7 +141,7 @@ impl char {
141
141
super :: convert:: from_u32 ( i)
142
142
}
143
143
144
- /// Converts a [ `u32`] to a `char`, ignoring validity.
144
+ /// Converts a `u32` to a `char`, ignoring validity.
145
145
///
146
146
/// Note that all `char`s are valid [`u32`]s, and can be cast to one with
147
147
/// `as`:
@@ -190,7 +190,7 @@ impl char {
190
190
/// sixteen, hexadecimal, to give some common values. Arbitrary
191
191
/// radices are supported.
192
192
///
193
- /// `from_digit()` will return [ `None`] if the input is not a digit in
193
+ /// `from_digit()` will return `None` if the input is not a digit in
194
194
/// the given radix.
195
195
///
196
196
/// # Panics
@@ -214,7 +214,7 @@ impl char {
214
214
/// assert_eq!(Some('b'), c);
215
215
/// ```
216
216
///
217
- /// Returning [ `None`] when the input is not a digit:
217
+ /// Returning `None` when the input is not a digit:
218
218
///
219
219
/// ```
220
220
/// use std::char;
@@ -299,7 +299,7 @@ impl char {
299
299
///
300
300
/// # Errors
301
301
///
302
- /// Returns [ `None`] if the `char` does not refer to a digit in the given radix.
302
+ /// Returns `None` if the `char` does not refer to a digit in the given radix.
303
303
///
304
304
/// # Panics
305
305
///
@@ -360,7 +360,7 @@ impl char {
360
360
/// println!();
361
361
/// ```
362
362
///
363
- /// Using [ `println!`](macro.println.html) directly:
363
+ /// Using `println! directly:
364
364
///
365
365
/// ```
366
366
/// println!("{}", '❤'.escape_unicode());
@@ -423,7 +423,7 @@ impl char {
423
423
/// as `char`s.
424
424
///
425
425
/// This will escape the characters similar to the [`Debug`](core::fmt::Debug) implementations
426
- /// of [ `str`] or `char`.
426
+ /// of `str` or `char`.
427
427
///
428
428
/// # Examples
429
429
///
@@ -436,7 +436,7 @@ impl char {
436
436
/// println!();
437
437
/// ```
438
438
///
439
- /// Using [ `println!`](macro.println.html) directly:
439
+ /// Using `println!` directly:
440
440
///
441
441
/// ```
442
442
/// println!("{}", '\n'.escape_debug());
@@ -490,7 +490,7 @@ impl char {
490
490
/// println!();
491
491
/// ```
492
492
///
493
- /// Using [ `println!`](macro.println.html) directly:
493
+ /// Using `println!` directly:
494
494
///
495
495
/// ```
496
496
/// println!("{}", '"'.escape_default());
@@ -543,9 +543,8 @@ impl char {
543
543
/// assert_eq!(len, 4);
544
544
/// ```
545
545
///
546
- /// The <code>[&](reference)[str]</code> type guarantees that its contents are UTF-8,
547
- /// and so we can compare the length it would take if each code point was represented
548
- /// as a `char` vs in the <code>[&](reference)[str]</code> itself:
546
+ /// The `&str` type guarantees that its contents are UTF-8, and so we can compare the length it
547
+ /// would take if each code point was represented as a `char` vs in the `&str` itself:
549
548
///
550
549
/// ```
551
550
/// // as chars
@@ -638,7 +637,7 @@ impl char {
638
637
unsafe { from_utf8_unchecked_mut ( encode_utf8_raw ( self as u32 , dst) ) }
639
638
}
640
639
641
- /// Encodes this character as UTF-16 into the provided [ `u16`] buffer,
640
+ /// Encodes this character as UTF-16 into the provided `u16` buffer,
642
641
/// and then returns the subslice of the buffer that contains the encoded character.
643
642
///
644
643
/// # Panics
@@ -648,7 +647,7 @@ impl char {
648
647
///
649
648
/// # Examples
650
649
///
651
- /// In both of these examples, '𝕊' takes two [ `u16`] s to encode.
650
+ /// In both of these examples, '𝕊' takes two `u16`s to encode.
652
651
///
653
652
/// ```
654
653
/// let mut b = [0; 2];
@@ -672,7 +671,7 @@ impl char {
672
671
encode_utf16_raw ( self as u32 , dst)
673
672
}
674
673
675
- /// Returns [ `true`](keyword.true.html) if this `char` has the `Alphabetic` property.
674
+ /// Returns `true` if this `char` has the `Alphabetic` property.
676
675
///
677
676
/// `Alphabetic` is described in Chapter 4 (Character Properties) of the [Unicode Standard] and
678
677
/// specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`].
@@ -702,7 +701,7 @@ impl char {
702
701
}
703
702
}
704
703
705
- /// Returns [ `true`](keyword.true.html) if this `char` has the `Lowercase` property.
704
+ /// Returns `true` if this `char` has the `Lowercase` property.
706
705
///
707
706
/// `Lowercase` is described in Chapter 4 (Character Properties) of the [Unicode Standard] and
708
707
/// specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`].
@@ -734,7 +733,7 @@ impl char {
734
733
}
735
734
}
736
735
737
- /// Returns [ `true`](keyword.true.html) if this `char` has the `Uppercase` property.
736
+ /// Returns `true` if this `char` has the `Uppercase` property.
738
737
///
739
738
/// `Uppercase` is described in Chapter 4 (Character Properties) of the [Unicode Standard] and
740
739
/// specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`].
@@ -766,7 +765,7 @@ impl char {
766
765
}
767
766
}
768
767
769
- /// Returns [ `true`](keyword.true.html) if this `char` has the `White_Space` property.
768
+ /// Returns `true` if this `char` has the `White_Space` property.
770
769
///
771
770
/// `White_Space` is specified in the [Unicode Character Database][ucd] [`PropList.txt`].
772
771
///
@@ -794,8 +793,7 @@ impl char {
794
793
}
795
794
}
796
795
797
- /// Returns [`true`](keyword.true.html) if this `char` satisfies either
798
- /// [`is_alphabetic()`] or [`is_numeric()`].
796
+ /// Returns `true` if this `char` satisfies either [`is_alphabetic()`] or [`is_numeric()`].
799
797
///
800
798
/// [`is_alphabetic()`]: #method.is_alphabetic
801
799
/// [`is_numeric()`]: #method.is_numeric
@@ -820,7 +818,7 @@ impl char {
820
818
self . is_alphabetic ( ) || self . is_numeric ( )
821
819
}
822
820
823
- /// Returns [ `true`](keyword.true.html) if this `char` has the general category for control codes.
821
+ /// Returns `true` if this `char` has the general category for control codes.
824
822
///
825
823
/// Control codes (code points with the general category of `Cc`) are described in Chapter 4
826
824
/// (Character Properties) of the [Unicode Standard] and specified in the [Unicode Character
@@ -845,7 +843,7 @@ impl char {
845
843
unicode:: Cc ( self )
846
844
}
847
845
848
- /// Returns [ `true`](keyword.true.html) if this `char` has the `Grapheme_Extend` property.
846
+ /// Returns `true` if this `char` has the `Grapheme_Extend` property.
849
847
///
850
848
/// `Grapheme_Extend` is described in [Unicode Standard Annex #29 (Unicode Text
851
849
/// Segmentation)][uax29] and specified in the [Unicode Character Database][ucd]
@@ -859,7 +857,7 @@ impl char {
859
857
unicode:: Grapheme_Extend ( self )
860
858
}
861
859
862
- /// Returns [ `true`](keyword.true.html) if this `char` has one of the general categories for numbers.
860
+ /// Returns `true` if this `char` has one of the general categories for numbers.
863
861
///
864
862
/// The general categories for numbers (`Nd` for decimal digits, `Nl` for letter-like numeric
865
863
/// characters, and `No` for other numeric characters) are specified in the [Unicode Character
@@ -927,7 +925,7 @@ impl char {
927
925
/// println!();
928
926
/// ```
929
927
///
930
- /// Using [ `println!`](macro.println.html) directly:
928
+ /// Using `println!` directly:
931
929
///
932
930
/// ```
933
931
/// println!("{}", 'İ'.to_lowercase());
@@ -992,7 +990,7 @@ impl char {
992
990
/// println!();
993
991
/// ```
994
992
///
995
- /// Using [ `println!`](macro.println.html) directly:
993
+ /// Using `println!` directly:
996
994
///
997
995
/// ```
998
996
/// println!("{}", 'ß'.to_uppercase());
0 commit comments