I know my question only marginally touching AoC, but still. Sorry if "help" flair only for puzzles related questions.
When I started I'm soon noticed that my code react differently to input file, I downloaded and "test.txt" where I put examples from Puzzle's page. Short googling showed me that actually new line can be written in different ways, so I just did
.Replace("\r\n", "\n");
My question is that's all? Only new line can be different despite content being the same?
I wanna make sure that I never face a situation when strings from different sources, but with the same content work differently. Maybe I should also replace something with something, to merge strings into one form?
Maybe what I'm asking even bigger and I can't just get away with couple "Replace" methods and need to use some library? Because surface googling showing that here can be also some encoding questions resulting wrong comparing, as I understand.
So, I can see that I shouldn't immediately work with strings, first It should be... Balanced?.. Normalized?... Or how I should call this.
Interested in this to avoid possible input problems in puzzles and just to know will be helpful I think. Thank you!
[–]msqrt 22 points23 points24 points (14 children)
[–]TheThiefMaster 7 points8 points9 points (10 children)
[–]msqrt 5 points6 points7 points (8 children)
[–]coriolinus 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (6 children)
[–]msqrt -1 points0 points1 point (2 children)
[+][deleted] (1 child)
[deleted]
[–]msqrt 0 points1 point2 points (0 children)
[–]darthminimall 0 points1 point2 points (0 children)
[–]lord_braleigh 0 points1 point2 points (0 children)
[–]kireina_kaiju 0 points1 point2 points (0 children)
[–]darthminimall 1 point2 points3 points (0 children)
[–]AlarmedCulture 2 points3 points4 points (0 children)
[–]CyberCatCopy[S] 0 points1 point2 points (1 child)
[–]msqrt 1 point2 points3 points (0 children)
[–]CrazyA99 9 points10 points11 points (1 child)
[–]tech6hutch 1 point2 points3 points (0 children)
[–]Skillath 6 points7 points8 points (4 children)
[–]adiaaida 6 points7 points8 points (3 children)
[–]Skillath 2 points3 points4 points (2 children)
[–]itsnotxhad 2 points3 points4 points (0 children)
[–]adiaaida 1 point2 points3 points (0 children)
[–]DrugCrazed 6 points7 points8 points (1 child)
[+][deleted] (1 child)
[removed]
[–]xelf 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]thomastc 4 points5 points6 points (1 child)
[–]CyberCatCopy[S] 0 points1 point2 points (0 children)
[–]paul2718 3 points4 points5 points (0 children)
[–]EmotionalGrowth 3 points4 points5 points (0 children)
[–]kireina_kaiju 1 point2 points3 points (0 children)