Watch
1
0
Fork
You've already forked advent-of-code
0

2021 Day 7

This commit is contained in:
Jeremy Kaplan 2021-12-06 21:42:15 -08:00
commit 0f454c5d1f
2 changed files with 121 additions and 0 deletions

View file

@ -84,3 +84,10 @@ func Cut(s, sep string) (before, after string) {
}
panic("Separator was not found in string")
}
func Ints(text string) (ns []int) {
for _, n := range strings.Split(text, ",") {
ns = append(ns, MustInt(n))
}
return
}