Replacing tabs with spaces in txt file

What commands i have to use to replace tabs with white spaces reading an input txt file?
Thank's to all!
My example of txt input file is this:

9 10.1.1.9 10.1.1.1 5,003375 00:00:00:00:09 00:00:00:00:08 3

The code that i try but doesn't work is:

1
2
size_t pos = buffer.find('\0009'); 
buffer.replace(pos,1," ");


The \u0009 is the Unicode Character 'CHARACTER TABULATION' for c++, is right?
'\t' is the tab character. '\0009' is a multi-character constant (NUL, 9). The first four characters '\000' are interpreted as an octal sequence (0 or the NUL character). The '9' is interpreted as stand-alone character.
Last edited on
Topic archived. No new replies allowed.