• Great, but it does a much simpler operation and certainly doesn't de-tabbify. In code, you are likely to get a mixture of spaces and tabs. The tab character actually is a control character that, in a mono-spaced font, means 'take me to the next TAB setting. It does not mean 'I'm eight spaces'(or whatever). TABS may be set to every eighth character position (or whatever) and so your code will work until the point that it finds a mixture of spaces, tabs and other control characters. There is a subtle difference as you'll find out when you try your routine on code that has both tabs and spaces in it. Why does code have both tabs and spaces? Hell, the coder uses both, and just whacks either the space-bar or the TAB key until columns line up. Programmers get irritated if their columns stop lining up, which is what will happen if they use your code.

    Best wishes,
    Phil Factor