()
| 202 | } |
| 203 | |
| 204 | func (b *Box) findAlign() (string, error) { |
| 205 | switch b.contentAlign { |
| 206 | case Center: |
| 207 | return centerAlign, nil |
| 208 | case Right: |
| 209 | return rightAlign, nil |
| 210 | case Left, "": |
| 211 | // If ContentAlign isn't provided then by default Alignment is Left |
| 212 | return leftAlign, nil |
| 213 | default: |
| 214 | return "", fmt.Errorf("invalid Content Alignment %s", b.contentAlign) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | func repeatWithString(c string, n int, str string) string { |
| 219 | cstr := ansi.Strip(str) |
no outgoing calls