core.decode-value
- description
- The value that core.encode-value wrote as text, or none if text is not written that way
- type
Fn(text: String) -> Union{#none, #some(@core.value)}- expression
fn(text$0) =>
let bytes$1 = @core.string-to-bytes(value: $0);
match @core.decode-value-at(text: $0, bytes: $1, index: 0) {
#some(read$2) =>
match @core.equal(left: $2.next, right: @core.list-length(value: $1)) {
true =>
#some($2.value),
false =>
#none
},
#none(_) =>
#none
}- visibility
- public
core.decode-value (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: yhMS6a1KLSlR00WFiDDcqRj0S5cnN8TFw8UJhR_5760
content hash: 6-gUgAEbCJW_lrFfoO7ri50qkMMMec4KiMOuac22gYY