Skip to content

Repl.box() method

Home > streplts > Repl > box

Wraps a string (or multi-line string) in an ASCII box.

Signature:

box(content: string, padding?: number): string;

Parameter

Type

Description

content

string

The text to wrap (supports newlines).

padding

number

(Optional) Optional horizontal padding (default 1).

Returns:

string