Macaulay2 » Documentation
Packages » Macaulay2Doc > The Macaulay2 language > strings and nets > String > net(String)
next | previous | forward | backward | up | index | toc

net(String) -- convert a string to a net

Synopsis

Description

Tab characters are converted to spaces, with a tab stop at every 8-th column.

In the following examples we can use peek to see the exact shape of the nets produced.

i1 : net "line 1\nline 2\nline 3\n"

o1 = line 1
     line 2
     line 3
i2 : peek oo

     +------+
o2 = |line 1|
     |line 2|
     |line 3|
     |      |
     +------+
i3 : net ""

o3 = 
i4 : peek oo

     ++
o4 = ||
     ++
i5 : net "\n"

o5 = 
i6 : peek oo

     ++
o6 = ||
     ||
     ++
i7 : net "\n\n\ta"

o7 = 

             a
i8 : peek oo

     +---------+
o8 = |         |
     |         |
     |        a|
     +---------+

See also

Ways to use this method: