首页 > 其他分享 >Rust 2022

Rust 2022

时间:2022-11-06 20:00:33浏览次数:108  
标签:www 2022 language Welcome str Rust

fn greet(language: &str) -> &str {
    return match language {
        "english"    => "Welcome",
        "czech"      => "Vitejte",
        "danish"     => "Velkomst",
        "dutch"      => "Welkom",
        "estonian"   => "Tere tulemast",
        "finnish"    => "Tervetuloa",
        "flemish"    => "Welgekomen",
        "french"     => "Bienvenue",
        "german"     => "Willkommen",
        "irish"      => "Failte",
        "italian"    => "Benvenuto",
        "latvian"    => "Gaidits",
        "lithuanian" => "Laukiamas",
        "polish"     => "Witamy",
        "spanish"    => "Bienvenido",
        "swedish"    => "Valkommen",
        "welsh"      => "Croeso",
        _            => "Welcome",
    };
}

https://www.rust-lang.org/zh-CN/

标签:www,2022,language,Welcome,str,Rust
From: https://www.cnblogs.com/ukzq/p/16863596.html

相关文章