[Rust] Why code in text like a peasant when you can code using emojis
[Rust] Why code in text like a peasant when you can code using emojis
tomdebruijn.com Calculating String length and width – Fun with Unicode
Finding the string length sounds easier than it is, if we want to be really accurate. Let's explore how does Unicode and emoji make this step more complex.
![Calculating String length and width – Fun with Unicode](https://lemmy.blahaj.zone/pictrs/image/Pi7UZRojCS.jpg?format=webp&thumbnail=256)
Why use pi when you can use 🥧
fn main() {
let pi_emoji = "🥧";
let pi_value = 3.1415926535897932384626433832;
println!("Let {} {:.28}", pi_emoji, pi_value);
}
0
comments