func (c *Canvas) String(separator string, fillEmptyWith string) string {
	tp := c.Size * c.Size
	strLen := c.Size - 1                                  
	strLen += (tp - c.Size) * len(separator)              
	strLen += c.FilledPoints                              
	strLen += (tp - c.FilledPoints) * len(fillEmptyWith)  
	bs := make([]byte, strLen)
	bl := 0
	for y := 0; y < c.Size; y++ {
		if mapY, exists := c.PointsMap[y]; exists {
			for x := 0; x < c.Size; x++ {
				if value, exists := mapY[x]; exists {
					if value > 9 {
						value = 9
					}
					bl += copy(bs[bl:], []byte(strconv.Itoa(value)))
				} else {
					bl += copy(bs[bl:], []byte(fillEmptyWith))
				}
				if x < c.Size-1 {
					bl += copy(bs[bl:], []byte(separator))
				}
			}
		} else {
			for x := 0; x < c.Size; x++ {
				bl += copy(bs[bl:], []byte(fillEmptyWith))
				if x < c.Size-1 {
					bl += copy(bs[bl:], []byte(separator))
				}
			}
		}
		if y < c.Size-1 {
			bl += copy(bs[bl:], "\n")
		}
	}
	return string(bs)
}
ToString generates a string version of the IdentIcon figure.
package identicon
import (
	"image"
	"strconv"
)
type Canvas struct {
	Size int
	PointsMap map[int]map[int]int
	MinY int
	MaxY int
	VisitedYPoints map[int]bool
	FilledPoints int
}
func (c *Canvas) Array() [][]int {
	canvasArray := make([][]int, c.Size)
	for i := range canvasArray {
		canvasArray[i] = make([]int, c.Size)
	}
	for y := range c.PointsMap {
		for x := range c.PointsMap[y] {
			canvasArray[y][x] = c.PointsMap[y][x]
		}
	}
	return canvasArray
}