add 2024/day3
This commit is contained in:
parent
02b95a7e65
commit
a7c0239f66
4 changed files with 90 additions and 0 deletions
|
@ -51,3 +51,21 @@ func ReadLinesToIntSlices() (lines [][]int) {
|
|||
|
||||
return lines
|
||||
}
|
||||
|
||||
func ReadLinesToStringSlices() (lines []string) {
|
||||
scanner := getLines()
|
||||
for scanner.Scan() {
|
||||
lines = append(lines, scanner.Text())
|
||||
}
|
||||
|
||||
return lines
|
||||
}
|
||||
|
||||
func ReadLinesToString() (line string) {
|
||||
scanner := getLines()
|
||||
for scanner.Scan() {
|
||||
line += scanner.Text()
|
||||
}
|
||||
|
||||
return line
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue