MCPcopy Create free account
hub / github.com/Recordscript/recordscript / get_string

Method get_string

libs/hbb_common/src/config.rs:1651–1662  ·  view source on GitHub ↗
(&self, key: &str, default: &str, others: Vec<&str>)

Source from the content-addressed store, hash-verified

1649
1650 #[inline]
1651 fn get_string(&self, key: &str, default: &str, others: Vec<&str>) -> String {
1652 match self.get_after(key) {
1653 Some(option) => {
1654 if others.contains(&option.as_str()) {
1655 option.to_owned()
1656 } else {
1657 default.to_owned()
1658 }
1659 }
1660 None => default.to_owned(),
1661 }
1662 }
1663
1664 #[inline]
1665 fn get_double_string(&self, key: &str, default: f64, min: f64, max: f64) -> String {

Callers 4

getMethod · 0.80

Calls 2

get_afterMethod · 0.80
as_strMethod · 0.80

Tested by

no test coverage detected