MCPcopy Create free account
hub / github.com/box-cli-maker/box-cli-maker / lolcat

Function lolcat

examples/lolcat/main.go:22–30  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

20}
21
22func 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
32func normalStyle(num float64, s string) string {
33 red := uint8(math.Sin(num+0)*127 + 128)

Callers 1

mainFunction · 0.85

Calls 1

normalStyleFunction · 0.85

Tested by

no test coverage detected