Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lloeki
on Jan 27, 2022
|
parent
|
context
|
favorite
| on:
Why can't you reverse a string with a flag emoji?
Should it reverse a BOM as well or keep it first?
account42
on Jan 28, 2022
|
next
[–]
Remove it since the BOM is a hack to deal with shitty transfer encodings (i.e. UTF-16LE vs. UTF-16BE) and useless for UTF-8.
Spivak
on Jan 27, 2022
|
prev
[–]
Keep it first? Like that’s not a gotcha. Your input is a string and the output is that string visually reversed. What it looks like in memory is irrelevant.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: