Difference between revisions of "Cutting line portion"

From TED Notepad
Line 14: Line 14:
 
*** four columns ({{string|HE}}, ''<nowiki>{empty}</nowiki>'', {{string|O&nbsp;WOR}} and {{string|D}}) &mdash; if delimited by an {{string|L}} character;
 
*** four columns ({{string|HE}}, ''<nowiki>{empty}</nowiki>'', {{string|O&nbsp;WOR}} and {{string|D}}) &mdash; if delimited by an {{string|L}} character;
 
**** but only three columns ({{string|HE}}, {{string|O&nbsp;WOR}} and {{string|D}}) &mdash; if {{field|Cutting line portion|Treat any sequence of delimiters as single delimiter}} option is turned on;
 
**** but only three columns ({{string|HE}}, {{string|O&nbsp;WOR}} and {{string|D}}) &mdash; if {{field|Cutting line portion|Treat any sequence of delimiters as single delimiter}} option is turned on;
*** and only one column ({{string|HELLO&nbsp;WORLD}}) &mdash; if delimited by an {{string|X}} character, {{defined|lowercase}} {{string|e}} character, or if delimited by no characters &mdash; this is because none of these characters are found on the examined line.
+
*** and only one column ({{string|HELLO&nbsp;WORLD}}) &mdash; if delimited by an {{string|X}} character, {{defined|lower case}} {{string|e}} character, or if delimited by no characters &mdash; this is because none of these characters are found on the examined line.
  
 
Note: {{defined|Columns}} are cut for each line separately, therefore the total number of {{defined|columns}} on a line may vary from line to line. If specified {{defined|column}} number is beyond the total number of {{defined|columns}}, empty zero-length portion is cut for such {{defined|column}} from that line. Therefore, it is allowed to cut {{defined|columns}} 2-7, even though some lines do not have enough {{defined|columns}} to offer.
 
Note: {{defined|Columns}} are cut for each line separately, therefore the total number of {{defined|columns}} on a line may vary from line to line. If specified {{defined|column}} number is beyond the total number of {{defined|columns}}, empty zero-length portion is cut for such {{defined|column}} from that line. Therefore, it is allowed to cut {{defined|columns}} 2-7, even though some lines do not have enough {{defined|columns}} to offer.

Revision as of 23:38, 20 November 2013

This section is up to date for TED Notepad version 6.3.1.0.

Cutting portion of a line is divided into two successive parts. First, columns are cut from the line, by either:

Note: Columns are cut for each line separately, therefore the total number of columns on a line may vary from line to line. If specified column number is beyond the total number of columns, empty zero-length portion is cut for such column from that line. Therefore, it is allowed to cut columns 2-7, even though some lines do not have enough columns to offer.

After the first part (cutting columns from the line), the resulting portion of the line can be further cropped by turning Use only characters option on, and specifying a range of character positions between from position and to position. This cuts off everyting before the from position and everyting after the to position.

  • Calculate the position backwards: from right to left can be used to numerate the character positions from the end of line rather than the usual way. Note, however, that this only affects how the positions are numbered before they are cropped; the text itself is not reversed.

Note: Range of character positions is always cropped after columns are cut. If a range is specified beyond currently cut columns, empty zero-length portion is cropped from that line, even if the original line continues after the cut columns. In other words, range of character positions cannot bring back what has already been cut off by previous step.

Note: There is currently no way to cut columns after cropping a range of character positions.

Note: Column preview button displays a small portion of lines transformed by current dialog values. Be aware that preview is always generated from the current selection. If there is no selection, then there is nothing to preview.