Value.as_str: def of emerging-ezjson@1.3.0.0 Import: import emerging-ezjson@1.3.0.0/src/value.bend as Value Lines 466-474 of emerging-ezjson@1.3.0.0/src/value.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&start_line=466&end_line=474 import Base # a string, or none when the value is not one def as_str(val: Json) -> Maybe<&2, String>: match val: case JStr{s}: Some{s} case JSpan{src, +n}: Some{span.str(src, n, U32.is_zero(n))} case other: None{} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_zero https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=span.str