MCPcopy Create free account
hub / github.com/acking-you/static_flow / value_string_opt

Function value_string_opt

crates/store/src/interactive_store.rs:925–936  ·  view source on GitHub ↗
(array: &StringArray, idx: usize)

Source from the content-addressed store, hash-verified

923}
924
925fn value_string_opt(array: &StringArray, idx: usize) -> Option<String> {
926 if array.is_null(idx) {
927 None
928 } else {
929 let value = array.value(idx).trim();
930 if value.is_empty() {
931 None
932 } else {
933 Some(value.to_string())
934 }
935 }
936}
937
938fn append_optional_str(builder: &mut StringBuilder, value: Option<&str>) {
939 match value {

Callers 1

Calls 2

trimMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected