up previous next
fold --
inset newlines into a long string
|
fold(S: STRING, W: INT): STRING |
This function copies a string inserting a newline every
W
characters. Together with
sprint
it can be helpful for
displaying a long result more comprehensibly. Also Emacs can become
quite slow if there are long lines in the output: combination of
sprint
and
fold can help in such cases.
/**/ n := factorial(100);
/**/ fold(sprint(n), 60);
933262154439441526816992388562667004907159682643816214685929
638952175999932299156089414639761565182862536979208272237582
51185210916864000000000000000000000000
|