Why can't you reverse a string with a flag emoji?
davidamos.dev
Why can't you reverse a string with a flag emoji?
1–10 of 247 posts
Re: Why can't you reverse a string with a flag emoji?
#2https://www.joelonsoftware.com/2003/10/08/the-absolute-minim...
Re: Why can't you reverse a string with a flag emoji?
#3Re: Why can't you reverse a string with a flag emoji?
#4Edit: Turns out my browser wasn't rendering the flags.
Re: Why can't you reverse a string with a flag emoji?
#5Re: Why can't you reverse a string with a flag emoji?
#6You'll probably be told "oh, assume US ASCII" or something, but in the meantime, if you can back that up when they dig into it, you'll look really smart.
Re: Why can't you reverse a string with a flag emoji?
#7Re: Why can't you reverse a string with a flag emoji?
#8Maybe I'm missing some prerequisite knowledge here, but why would I assume `flag="us"` is an emoji? Looking at that first block of code, there is no reason for me to think "us" is a single character. Edit: Turns out my browser wasn't rendering the flags.
Re: Why can't you reverse a string with a flag emoji?
#9Example: https://github.com/kennell/flagz/blob/master/flagz.py
Re: Why can't you reverse a string with a flag emoji?
#10So, in terms of acing interviews, increasingly one of the best answers to the question "Write some code that reverses a string" is that in a world of unicode, "reversing a string" is no longer possible or meaningful. You'll probably be told "oh, assume US ASCII" or something, but in the meantime, if you can back that up when they dig into it, you'll look really smart.