logoalt Hacker News

__david__12/09/20242 repliesview on HN

Wouldn’t “x”.join(…) be enough?


Replies

blueflow12/09/2024

Possibly not:

  "x".join({'aa'+'bxb'}) == "x".join({'aaxb','b'})
The separator should not be able to show up in the inputs.
show 2 replies
Terr_12/09/2024

Only if you can guarantee it that possible for someone to sneak in an input that already contains those "x" characters.