DEV Community

Discussion on: 1 line of code: How to convert tabs to spaces

Collapse
 
martinkr profile image
Martin Krause

Hey Alex,

Thank you, good catch! You want to contribute an optimised version and I update the article?

Cheers!

Collapse
 
lexlohr profile image
Alex Lohr • Edited

Unfortunately, that's not a one-liner anymore, as you would have to calculate the expected position of the tab even inside the string, so it's a lot more complex. I would advise to merely document this edge case.