std.string-to-utf8-stream
- description
- Convert a string into a UTF-8 pull-based byte stream ({ initialState, next })
- type
Fn(text: String) -> Record{ initialState: Number, next: Fn(state: Number) -> Union{#yield(Record{chunk: List<Number>, nextState: Number}), #done} }- expression
fn(text$1) => { initialState: 0, next: fn(state$2) => match @core.and( left: @core.equal(left: $2, right: 0), right: @core.greater-than(left: @core.string-length(value: $1), right: 0) ) { true => #yield({chunk: @core.string-to-bytes(value: $1), nextState: 1}), false => #done } }- visibility
- public
std.string-to-utf8-stream (project definy, branch local-host-wasi-io, snapshot 6q6wel2IrvXMEdXtZFbi0BgBld-vO0GChR39-U-GIJY) id: U9xJ_UsIq7hilgS1aWzFi1BoH-pWYTuWVr1FcA3ugkg content hash: 2Ig-7sxA-LzrflaCKVefL4V7KcmfHwdd4Pq126YE7XU