(str string)
| 20 | } |
| 21 | |
| 22 | func lolcat(str string) string { |
| 23 | var output string |
| 24 | freq := float64(0.1) |
| 25 | for s := range strings.SplitSeq(str, "") { |
| 26 | output += normalStyle(freq, s) |
| 27 | freq += 0.1 |
| 28 | } |
| 29 | return output |
| 30 | } |
| 31 | |
| 32 | func normalStyle(num float64, s string) string { |
| 33 | red := uint8(math.Sin(num+0)*127 + 128) |