Function advent_of_code_ocr::split_screen
source · Expand description
Split a string representing a AoC screen into the section strings for the individual characters. This assumes every character is 4 characters wide and a single column is used to split the individual letters.
This will split the string:
###.###....##.###..###..#..#..##..#..#.
#....#..#....#.#..#.#..#.#.#..#..#.#..#.
##..#..#....#.###..#..#.##...#..#.####.
#....###.....#.#..#.###..#.#..####.#..#.
#....#....#..#.#..#.#.#..#.#..#..#.#..#.
###.#.....##..###..#..#.#..#.#..#.#..#.
into the vector of
### ###. ..## ###. ###. #..# .##. #..#
#... #..# ...# #..# #..# #.#. #..# #..#
##. #..# ...# ###. #..# ##.. #..# ####
#... ###. ...# #..# ###. #.#. #### #..#
#... #... #..# #..# #.#. #.#. #..# #..#
### #... .##. ###. #..# #..# #..# #..#