Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » strings and nets » pad
next | previous | forward | backward | up | index | toc

pad -- pad a string or net with spaces

Description

pad(s,n) pads the string or net s to length n with spaces on the right.

pad(n,s) pads the string or net s to length n with spaces on the left.

i1 : pad(6, "foo")

o1 =    foo
i2 : pad("foo", 6) | "bar"

o2 = foo   bar

Ways to use pad:

  • pad(Net,ZZ)
  • pad(String,ZZ)
  • pad(ZZ,Net)
  • pad(ZZ,String)

For the programmer

The object pad is a method function.


The source of this document is in Macaulay2Doc/ov_strings.m2:519:0.