break_string(3) LPC Library Functions break_string(3)
NNAAMMEE
break_string() - break a string at regular intervals
SSYYNNOOPPSSIISS
string break_string( string str | int foobar, int len,
void | int indent | string indent );
DDEESSCCRRIIPPTTIIOONN
This function breaks a continous string without newlines
into a a string with newlines inserted at every `len':th
character.
If `indent' is defined and is given as an integer,
`indent' number of spaces are inserted after every new-
line. If `indent' is a string that string is inserted
before every newline.
If the first argument is an integer, the function simply
returns 0.
BBUUGGSS
break_string() is *not* context sensitive. It does not
take account of periods '.' and new-lines '\n'. This
means that the result is not necessarily what you would
expect. My experience is that you should use one space
after a period and do not embed new-lines in the text, but
append them to the result of break_string(). If this for-
mat does not meet your tastes you may find break_string()
to be inadequate. A future revision of break_string() may
allow different line-breaking semantics. (Cygnus)
SSEEEE AALLSSOO
implode(3), explode(3), sprintf(3)
MudOS 5 Sep 1994 1