Wolfram Research

Function Repository Resource:

StringWrap

Source Notebook

Line-wrap a string at a specific width

Contributed by: Arnoud Buzing

ResourceFunction["StringWrap"][string,n]

line-wraps string at width n.

Examples

Basic Examples

Line-wrap a Wikipedia article at 40 characters:

In[1]:=
ResourceFunction["StringWrap"][WikipediaData["Ontario Morning"], 40]
Out[1]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information