This library prints strings in pre-defined shapes
package main
import "github.com/senpathi/printy"
func main() {
str := `This is a sample string to print in senpathi/printy Rectangle`
printy.PrintInRectangle(str, 16, 1)
}
Output:
* * * * * * * * * * * * * * * * * ** *
* This is a sample string to print *
* in senpathi/printy Rectangle *
* * * * * * * * * * * * * * * * * ** *
package main
import "github.com/senpathi/printy"
func main() {
str := `This is a sample string to print in senpathi/printy Triangle`
printy.PrintInTriangle(str)
}
Output:
*
* *
* *
* T *
* his *
* is a *
* sample *
* string t *
* o print in *
* senpathi/prin *
* ty Triangle *
* * * * * * * * * * * *
package main
import (
"github.com/senpathi/printy"
)
func main() {
str := `This is a sample string to print in senpathi/printy Circle`
printy.PrintInCircle(str)
}
Output:
***** *****
** **
* This is a *
* sample string *
* to print in senpa *
* thi/printy Circle *
* *
* *
* *
** **
***** *****