[][src]Function inflector::cases::screamingsnakecase::to_screaming_snake_case

pub fn to_screaming_snake_case(non_snake_case_string: &str) -> String

Converts a &str to SCREAMING_SNAKE_CASE String

    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "foo_bar";
    let expected_string: String = "FOO_BAR".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);
    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "HTTP Foo bar";
    let expected_string: String = "HTTP_FOO_BAR".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);
    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "Foo bar";
    let expected_string: String = "FOO_BAR".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);
    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "Foo Bar";
    let expected_string: String = "FOO_BAR".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);
    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "FooBar";
    let expected_string: String = "FOO_BAR".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);
    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "fooBar";
    let expected_string: String = "FOO_BAR".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);
    use inflector::cases::screamingsnakecase::to_screaming_snake_case;
    let mock_string: &str = "fooBar3";
    let expected_string: String = "FOO_BAR_3".to_string();
    let asserted_string: String = to_screaming_snake_case(mock_string);
    assert!(asserted_string == expected_string);