/// Returns a new Locale object with the given country code and optional language code.
/// If country code is empty returns default locale instead.
Returns a new Locale object with the given country code and optional language code.
If country code is empty returns default locale instead.
Returns a new Locale object with the given country code and optional language code . If country code is empty returns default locale instead .
pub fn new(cc: &str, lc: Option<&str>) -> Self {
        let cc = String::from(cc);
        if cc.is_empty() {
            Locale::default()
        } else {
            Self {
                cc,
                lc: lc.map(String::from),
            }
        }
    }
pub fn new ( cc : & str , lc : Option < & str > ) -> Self { let cc = String :: from ( cc ) ; if cc . is_empty ( ) { Locale :: default ( ) } else { Self { cc , lc : lc . map ( String :: from ) , } } }
Returns a new Locale object with the given country code and optional language code.
Returns a new Locale object with the given country code and optional language code .
cc
&str
lc
Option<&str>