definy.text-integer-from
- description
- Read decimal digits from index, adding them to value
- type
Fn(source: Record{text: String, bytes: List<Number>}, index: Number, value: Number) -> Record{value: Number, next: Number}- expression
fn(source$0, index$1, value$2) => let byte$3 = @definy.text-byte-at(source: $0, index: $1); match @definy.text-is-digit(byte: $3) { true => @definy.text-integer-from( source: $0, index: @core.plus(left: $1, right: 1), value: @core.plus(left: @core.multiply(left: $2, right: 10), right: @core.minus(left: $3, right: 48)) ), false => {value: $2, next: $1} }
- visibility
- public
definy.text-integer-from (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo) id: iyRMw-xO6I1VUh9qP5lYTAkmPttFBlfOp7II3dbXDNQ content hash: zvUWPzx8pVUzdAVISaeA1Q3nkkyNErFPLuZ3yILK-yM