Page 1 of 1

Suggested new filter Add line widths

Posted: Mon Jun 01, 2020 8:33 pm
by dfhtextpipe
In the Add branch of the Filter library, it could be useful to provide a new filter to Add line widths.

Currently, I have to resort to using the Excelâ„¢ formula =LEN(B1) to get this type of data.

The UI for this filter should include the means to specify Format as under Add line numbers.

David

Re: Suggested new filter Add line widths

Posted: Tue Jun 16, 2020 9:16 am
by Fixer
good idea!

Re: Suggested new filter Add line widths

Posted: Wed Sep 23, 2020 10:05 pm
by DataMystic Support
Hi David - do you mean add the length of the line?

If so, this is very easy to do as follows with a scripting filter:

Code: Select all


function processLine(line, EOL)
  processLine = line & " " & len(line) & EOL
end function

sub startJob()
end sub

sub endJob()
end sub

function startFile()
  a = 0
  startFile = ""
end function

function endFile()
  endFile = ""
end function