diff --git a/colored_msg/src/main.rs b/colored_msg/src/main.rs index e7a11a9..003ae23 100644 --- a/colored_msg/src/main.rs +++ b/colored_msg/src/main.rs @@ -1,3 +1,33 @@ fn main() { - println!("Hello, world!"); + // println!("{}", parse_color("hello world")); +} + +enum Block { + String(String), + Bold, + Under, + Color(String), + TrueColor(u8, u8, u8), + EndAll, + EndBold, + EndUnder, + EndColor, +} + +/// +/// +/// \\ \< +fn parse_color(msg: &str) -> Vec { + let mut parsed_blocks = vec![]; + let mut msg_iter = msg.chars().peekable(); + + while let Some(c) = msg_iter.next() { + if c == '\\' { + // match msg_iter.next() { + // Some(c) => parsed_blocks.push(c), None => break, + // } + } + } + + parsed_blocks }