yandext 0.1.1

Generate yandex translate links for input links
Documentation
pub struct Translator <'a> {
    pub from: &'a str,
    pub to: &'a str
}


impl Translator <'_> {
    pub fn new <'a> (from: &'a str, to: &'a str) -> Translator <'a> {
        Translator{from, to}
    }

    pub fn make_link(&self, base: String) -> String {
        let mut based = "https://translated.turbopages.org/proxy_u/%%from-%%to.%%to.".to_owned().replace("%%from", &self.from).replace("%%to", &self.to);
    
        based.push_str(&base.replace(":", ""));
    
        String::from(based)
    }
}