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