|
Post by tanger32au on Dec 18, 2018 5:36:06 GMT
|
|
|
Post by B+ on Dec 18, 2018 5:50:29 GMT
And this file is loaded with doubled spaced parts to remove? (It looks pretty good as is.)
What I do notice is that the right sides of the lines could be trimmed, as there are allot of spaces after the text.
|
|
|
Post by tanger32au on Dec 18, 2018 5:59:11 GMT
And this file is loaded with doubled spaced parts to remove? (It looks pretty good as is.) What I do notice is that the right sides of the lines could be trimmed, as there are allot of spaces after the text. This is what the file looks like to me:
|
|
|
Post by B+ on Dec 18, 2018 6:09:24 GMT
' Fix tanger file.txt for JB v2 B+ 2018-12-17
FixMe$ = "FixMe tanger file.txt" open FixMe$ for input as #1 open "better tanger file.txt" for output as #2 while eof(#1) = 0 line input #1, fline$ print #2, doubleSpaceVacuumCleaner$(trim$(fline$)) wend close #1 close #2 print "File work is done."
function doubleSpaceVacuumCleaner$(text$) doubleSpace = instr(text$, " ") while doubleSpace text$ = mid$(text$, 1, doubleSpace - 1) + mid$(text$, doubleSpace + 2) doubleSpace = instr(text$, " ") wend doubleSpaceVacuumCleaner$ = text$ end function
output:
Commercial is misspelled in many places.
|
|
|
Post by tanger32au on Dec 18, 2018 9:19:07 GMT
Thanks, that worked very well.
|
|