File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -3971,6 +3971,16 @@ impl str {
3971
3971
/// [`to_ascii_uppercase`].
3972
3972
///
3973
3973
/// [`to_ascii_uppercase`]: #method.to_ascii_uppercase
3974
+ ///
3975
+ /// # Examples
3976
+ ///
3977
+ /// ```
3978
+ /// let mut s = String::from("Grüße, Jürgen ❤");
3979
+ ///
3980
+ /// s.make_ascii_uppercase();
3981
+ ///
3982
+ /// assert_eq!("GRüßE, JüRGEN ❤", s);
3983
+ /// ```
3974
3984
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
3975
3985
pub fn make_ascii_uppercase ( & mut self ) {
3976
3986
let me = unsafe { self . as_bytes_mut ( ) } ;
@@ -3986,6 +3996,16 @@ impl str {
3986
3996
/// [`to_ascii_lowercase`].
3987
3997
///
3988
3998
/// [`to_ascii_lowercase`]: #method.to_ascii_lowercase
3999
+ ///
4000
+ /// # Examples
4001
+ ///
4002
+ /// ```
4003
+ /// let mut s = String::from("Grüße, Jürgen ❤");
4004
+ ///
4005
+ /// s.make_ascii_lowercase();
4006
+ ///
4007
+ /// assert_eq!("grüße, jürgen ❤", s);
4008
+ /// ```
3989
4009
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
3990
4010
pub fn make_ascii_lowercase ( & mut self ) {
3991
4011
let me = unsafe { self . as_bytes_mut ( ) } ;
You can’t perform that action at this time.
0 commit comments