rust_demos 0.1.0

Aa demo crate
Documentation
use std::collections::HashMap;
fn main(){
	println!("Enter string:");
	let mut input=String::new();
	std::io::stdin().read_line(&mut input).expect("Failed to read");
	let mut word=input.trim().replace("\t","").replace(" ","");
	get_unique_chars(&word);
	//println!("{}",word);
	
}
fn get_unique_chars(word:&str){
	let mut char_count:HashMap<char,usize>=HashMap::new();
	for ch in word.chars(){
		*char_count.entry(ch).or_insert(0)+=1;
	}
	/*for (key,value) in char_count.iter(){
		if char_count[&key]==1{
			println!("{}",key);
		}
	}*/
	let mut unique_vec:Vec<char> = Vec::<char>::new();
	for ch in word.chars(){
		if char_count[&ch]==1{
			unique_vec.push(ch);
		}
	}
	print!("Unique characters in the given string:{:?}",unique_vec);

}