MCPcopy
hub / github.com/spicetify/cli / stringToInt

Function stringToInt

src/utils/color.go:138–153  ·  view source on GitHub ↗
(raw string, base int)

Source from the content-addressed store, hash-verified

136}
137
138func stringToInt(raw string, base int) int64 {
139 value, err := strconv.ParseInt(raw, base, 0)
140 if err != nil {
141 value = 255
142 }
143
144 if value < 0 {
145 value = 0
146 }
147
148 if value > 255 {
149 value = 255
150 }
151
152 return value
153}
154
155func getXRDB() error {
156 db := map[string]string{}

Callers 1

ParseColorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected