({{, (RefLink[InsertLinebreaks, paclet:ref/InsertLinebreaks])["string"] 
inserts newline characters into string to make a string in which no line is longer than 78 characters.}, {, (RefLink[InsertLinebreaks, paclet:ref/InsertLinebreaks])["string",n]
inserts newline characters to make no line longer than n characters. }})

OpenersNotesSection(Spacer1)Details

(RefLink[InsertLinebreaks, paclet:ref/InsertLinebreaks]) works by replacing whitespace with newline characters.

If a single span of non-whitespace characters is longer than n characters, newlines will be inserted every n characters within the span.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Insert newlines to ensure no line is longer than 30 characters:

InsertLinebreaks["x xx xxx xxxx xxxxx xxxxx x xx xxx xxxx xxxxx xxxxx x xx xxx xxxx xxxxx xxxxx x xx xxx xxxx xxxxx xxxxx",30]

Words longer than 30 characters will be broken:

InsertLinebreaks["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zzz",30]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[StringPartition, paclet:ref/StringPartition])  ▪  (RefLink[StringInsert, paclet:ref/StringInsert])  ▪  (RefLink[StringReplace, paclet:ref/StringReplace])  ▪  (RefLink[PageWidth, paclet:ref/PageWidth])  ▪  (RefLink[OutputForm, paclet:ref/OutputForm])  ▪  (RefLink[Column, paclet:ref/Column])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[String Operations, paclet:guide/StringOperations])}, {▪(RefLinkPlain[Text Analysis, paclet:guide/TextAnalysis])}})}})