Split how? E.g. if there was a 5 character limit, would you want the word database to be:
datab ase
or
datab
ase
or just "datab"?
you dont have *nix?
OK, you didn't answer my question, but assuming you wanted the second option, in GVim:
1. This does what you want, but may leave blank lines after lines of exact multiples of 1000 characters:
:%s/\(.\{1000\}\)/\1\r/g
2. This does nearly what you want, doesn't leave blank lines, but the first line is only 999 characters long:
:%s/\(.\{999\}\)\([^\n]\)/\1\r\2/g
I'm PM'ing you a link to a small C++ project I made that I *think* does what you're asking.
The project has the executable (which you can choose to ignore ), plus the C++ source file and the MSVS 2008 Express solution.
So, if you want to modify what I made, just open it up and have at.
breaktest alice.txt 1000
limer,
I didn't understand your problem.
I've updated my program to do what I think you want.
The segments still go in a *single* file, but are delimited clearly in your defined char width.
MD5: fd68be5180cfb7121a464a61baa4aaa6
