We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go-figure/figure.go
Line 48 in 734e95f
func (figure figure) Slicify() (rows []string) { for r := 0; r < figure.font.height; r++ { printRow := "" for i, char := range figure.phrase { if char < first_ascii || char > last_ascii { if figure.strict { log.Fatal("invalid input.") } else { char = '?' } } fontIndex := char - ascii_offset charRowText := scrub(figure.font.letters[fontIndex][r], figure.font.hardblank)
var mid string if i != 0 { if l:= printRow[len(printRow) - 1:]; l != " " { mid = l } else { mid = charRowText[0:1] } printRow = printRow[:len(printRow) - 1] + mid + charRowText[1:] } else { printRow += charRowText } } if r < figure.font.baseline || len(strings.TrimSpace(printRow)) > 0 { rows = append(rows, strings.TrimRight(printRow, " ")) } } return rows
}
| | | | | | | ___ | || |/ _ \ | |/ _ | _ | __/ | | () | || ||___||_|___/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
go-figure/figure.go
Line 48 in 734e95f
func (figure figure) Slicify() (rows []string) {
for r := 0; r < figure.font.height; r++ {
printRow := ""
for i, char := range figure.phrase {
if char < first_ascii || char > last_ascii {
if figure.strict {
log.Fatal("invalid input.")
} else {
char = '?'
}
}
fontIndex := char - ascii_offset
charRowText := scrub(figure.font.letters[fontIndex][r], figure.font.hardblank)
}
| | | | | | | ___
| || |/ _ \ | |/ _
| _ | __/ | | () |
|| ||___||_|___/
The text was updated successfully, but these errors were encountered: