String manipulation in Rust | Advent of Code
This year I wanted to learn Rust with advent of code. As all of the tasks start by getting some input data as a string an parsing it you have to do quite some string manipulation. Coming from javascript/typescript where this is quite forward I don't think that the code I wrote is actually good or pretty. For example with todays puzzle you first want to split by line, which is easy. A line looks like this:
Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
Here you want to split by the : and then need to split further, but in order to do that you first have to collect it as a Vec<&str>. You can't also just deconstruct the Vec easily into single variables.
I really like Rust for all it's other capabilities, but string manipulation just seems quite expressive. I'm just a beginner so is there an easier way to achieve something like that? How can I improve?