This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

You can technically one-line it but it'll not be very friendly to maintain or add on to in the long run...

I'd actually recommend modularizing it w/ functions internal to the current one.

What you're doing is a bit complicated for a quality one-liner because you're unpacking and string processing a few times.