[−][src]Function inflector::string::deconstantize::deconstantize
pub fn deconstantize(non_deconstantized_string: &str) -> String
Deconstantizes a &str
use inflector::string::deconstantize::deconstantize; let mock_string: &str = "Bar"; let expected_string: String = "".to_owned(); let asserted_string: String = deconstantize(mock_string); assert!(asserted_string == expected_string);
use inflector::string::deconstantize::deconstantize; let mock_string: &str = "::Bar"; let expected_string: String = "".to_owned(); let asserted_string: String = deconstantize(mock_string); assert!(asserted_string == expected_string);
use inflector::string::deconstantize::deconstantize; let mock_string: &str = "Foo::Bar"; let expected_string: String = "Foo".to_owned(); let asserted_string: String = deconstantize(mock_string); assert!(asserted_string == expected_string);
use inflector::string::deconstantize::deconstantize; let mock_string: &str = "Test::Foo::Bar"; let expected_string: String = "Foo".to_owned(); let asserted_string: String = deconstantize(mock_string); assert!(asserted_string == expected_string);