html-ui.parse-count
- description
- Reads the decimal digits of text from index (acc is the value so far; stops at a non-digit)
- type
Fn(text: String, index: Number, acc: Number) -> Number
- expression
fn(text$0, index$1, acc$2) => match @core.less-than(left: $1, right: @core.string-length(value: $0)) { false => $2, true => let digit$3 = @core.string-index-of( text: "0123456789", target: @core.string-slice(value: $0, start: $1, end: @core.plus(left: $1, right: 1)), start: 0 ); match @core.less-than(left: $3, right: 0) { true => $2, false => @html-ui.parse-count( text: $0, index: @core.plus(left: $1, right: 1), acc: @core.plus(left: @core.multiply(left: $2, right: 10), right: $3) ) } }
- visibility
- public
html-ui.parse-count (project html-ui, branch edit-check, snapshot FWBeS680eOlm6c2NOnWcarkR0iM2Jt6ap5-Rv0zDiXk) id: q-0Ak__jxUDLwB3MW5NZDHBA88nxbjfMJMfj0QtV4Ug content hash: 72iXjK77L87mMql_J_qQcy42_WWEa9_othk_oq7cM1k