str2d.Str2D.box_over
- Str2D.box_over(style: ~str2d.BoxStyle | str = SINGLE
- Str2D.box_overROUND()
- Str2D.box_over╭─┬─╮
- Str2D.box_over│ │ │
- Str2D.box_over├─┼─┤
- Str2D.box_over│ │ │
- Str2D.box_over╰─┴─╯ ) -> ~str2d.Str3D
Create a box over the data. The difference between this and box_around is that this method creates a box over the data and the other method creates a box around the data. The box that is created will cover the edges of the data. This is useful when preserving the size is important.
- Parameters:
style (Union[BoxStyle, str], optional) – The style of the box, by default BoxStyle.single_round.
- Returns:
A new Str3D object with the box over the data.
- Return type:
Str3D
See also
box_around
Create a box around the data.
box
Create a box around the data.
Examples
Let’s create an instance of Str2D and assign it to the variable a and then create a box over it.
from str2d import Str2D a = Str2D('abcdef\nghijkl\nmnopqr\nstuvwx') a
abcdef ghijkl mnopqr stuvwx
a.box_over()
╭────╮ │hijk│ │nopq│ ╰────╯