Uh oh!
There was an error while loading. Please reload this page.
Minor rewrite of char primitive unicode intro. - #43919
Conversation
Opened primarily to address rust-lang#36998.
frewsxcv
commented
Aug 17, 2017
rust-highfive
commented
Aug 17, 2017
(rust_highfive has picked a reviewer for you, use r? to override) |
| /// | ||
| /// This means it won't fit into a `char`. Trying to create a literal with | ||
| /// `let heart = '❤️';` gives an error: | ||
| /// This means that the contents of the first string above _will_ fit into a |
There was a problem hiding this comment.
Note to self: it's not a string technically, it's a string slice, but that might be getting too deep in the weeds
There was a problem hiding this comment.
Eh, i often use lowercase "string" to refer to text data in general, and uppercase "String" (potentially with backticks) to denote the owned-text-data type in the standard library. I don't think it's a problem here.
QuietMisdreavus
commented
Aug 17, 2017
@bors r+ rollup Thanks! I like this example better, especially since you put in the character names in there. |
bors
commented
Aug 17, 2017
📌 Commit 1065ad4 has been approved by |
…=QuietMisdreavus Minor rewrite of char primitive unicode intro. Opened primarily to address rust-lang#36998. Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two. Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing 😅
bors
commented
Aug 19, 2017
…eavus Minor rewrite of char primitive unicode intro. Opened primarily to address #36998. Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two. Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing 😅
bors
commented
Aug 19, 2017
☀️ Test successful - status-appveyor, status-travis |
Opened primarily to address #36998.
Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two.
Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing 😅