get_operating_system_name

Function get_operating_system_name 

Source
pub fn get_operating_system_name() -> &'static str
Expand description

Returns the short name of the underlying operating system.

Posible values are listed here: https://doc.rust-lang.org/std/env/consts/constant.OS.html

ยงExamples

let name = jabba_lib::jos::get_operating_system_name();
Examples found in repository?
examples/os.rs (line 4)
3fn main() {
4    let op_sys = jos::get_operating_system_name();
5    println!("Your operating system is {:?}", op_sys);
6
7    println!(
8        "Is it Linux?   {}",
9        if jos::is_linux() { "yes" } else { "no" }
10    );
11    println!(
12        "Is it Windows? {}",
13        if jos::is_windows() { "yes" } else { "no" }
14    );
15}