Jak usunac wielokrotnosc spacji uzywajac metod? Jak na razie moj program usuwa tabulature.
fstream input(argv[1]);
ofstream output(argv[2]);
string line;
while(getline(input, line))
{
transform(line.begin(), line.end(), line.begin(), ::toupper);
replace( line.begin(), line.end(), '\t', ' ' );
// line.replace('\t',' ');
cout << line;
cout << endl;
Czyli tak:
Mam jakis tekst ktory zawiera duzo spacji i tabulatur. Na razie usuwam tabbulatury, pozniej chcialbym usunac dodatkowe spacje.