# wrap

## Synopsis

• Usage:
wrap(wid,sep,s)
• Inputs:
• Outputs:
• a string obtained by wrapping the string s, in case it is wider than the number wid, so that it occupies multiple lines, separated by lines filled with the single character in the string sep, if provided

## Description

The inputs wid and sep are optional, and can be given in either order. The default for wid is printWidth, and the default for sep is null.
 i1 : wrap(10,"abcdefghijklmnopqrstuvwxyz") o1 = abcdefghij klmnopqrst uvwxyz i2 : wrap(10,"-","abcdefghijklmnopqrstuvwxyz") o2 = abcdefghij ---------- klmnopqrst ---------- uvwxyz

## For the programmer

The object wrap is .