2021 Day 7
This commit is contained in:
parent
01699081b4
commit
0f454c5d1f
2 changed files with 121 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue