(Created page with "<seo title="Make All Lines the Same Length | vEdit" description="Learn how easy vEdit makes it to make all text lines of your file the same length, this is needed for importi...") |
(→Force All Lines to the Same Length) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<seo title="Make All Lines the Same Length | vEdit" description="Learn how easy vEdit makes it to make all text lines of your file the same length, this is needed for importing files into some databases."></seo> | <seo title="Make All Lines the Same Length | vEdit" description="Learn how easy vEdit makes it to make all text lines of your file the same length, this is needed for importing files into some databases."></seo> | ||
| − | {{DISPLAYTITLE:Make All Lines the Same | + | {{DISPLAYTITLE:Make All Lines the Same Length}} |
vEdit makes it easy to ensure that all lines in a text file have the same length. For example, if each text line is one data record and the file will be | vEdit makes it easy to ensure that all lines in a text file have the same length. For example, if each text line is one data record and the file will be | ||
| Line 9: | Line 9: | ||
[[File:Pad_Lines_To_Same_Length.png|border|upright|class=img-responsive center-block|link=]] | [[File:Pad_Lines_To_Same_Length.png|border|upright|class=img-responsive center-block|link=]] | ||
| − | + | ==Force All Lines to the Same Length== | |
#Select <kbd>Edit</kbd> , <kbd>Convert</kbd> then <kbd>All lines same length</kbd> | #Select <kbd>Edit</kbd> , <kbd>Convert</kbd> then <kbd>All lines same length</kbd> | ||
| Line 16: | Line 16: | ||
#Click <kbd>Pad</kbd>. Every line in the file, which is shorter than the desired length, will have spaces added at the end of the line to equal the desired length. | #Click <kbd>Pad</kbd>. Every line in the file, which is shorter than the desired length, will have spaces added at the end of the line to equal the desired length. | ||
| − | + | If any lines are already longer than the desired length, you are prompted with: Ignore, Truncate, or Stop. | |
It is recommended to stop and correct this inconsistency. | It is recommended to stop and correct this inconsistency. | ||
vEdit makes it easy to ensure that all lines in a text file have the same length. For example, if each text line is one data record and the file will be
imported into a database, all lines may need to be the same length.
The function EDIT > Convert > All lines same length forces all text lines to have the same length; it prompts for the desired length. Lines shorter than the desired length are padded at their end with spaces; lines longer than the desired length are optionally truncated.

If any lines are already longer than the desired length, you are prompted with: Ignore, Truncate, or Stop.
It is recommended to stop and correct this inconsistency.
Alternatively, you can truncate the too-long lines. If you ignore the long lines, not all lines will have the same length.
See Also: