~/bend-docscommunity

tui/num.bend relies on unsafe/foreign

raw source on the hub · import cswap-bend-cli@0.1.0.0/tui/num.bend as Num

3 imports
import Base
import ../json.bend as Json
import ../clock.bend as Clock

Definitions

def sel source · line 7 · raw

@+c:Bool -> @+x:U32 -> @+y:U32 -> U32

def read_or source · line 14 · raw

@+m:Maybe<&2, U32> -> @+d:U32 -> U32

def frac_centi source · line 22 · raw

@+f:String -> Maybe<&2, U32>

Two fraction digits, padded: "5" -> 50, "07" -> 7, "555" -> 55.

def centi_join source · line 25 · raw

@+i:Maybe<&2, U32> -> @+f:Maybe<&2, U32> -> Maybe<&2, U32>

def centi_parts source · line 32 · raw

@+ps:List<&2, String> -> Maybe<&2, U32>

def centi_text source · line 42 · raw

@+t:String -> Maybe<&2, U32>

"47" -> 4700, "47.5" -> 4750, "47.555" -> 4755; anything else is None.

def centi_of source · line 45 · raw

@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def centi_at2 source · line 52 · raw

@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, U32>

def centi_at source · line 59 · raw

@+key:String -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def secs_parts source · line 62 · raw

@+ps:List<&2, String> -> Maybe<&2, U32>

def secs_of source · line 70 · raw

@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

Whole seconds of a JSON number: "1792740000.1" -> 1792740000.

def secs_at2 source · line 77 · raw

@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, U32>

def secs_at source · line 84 · raw

@+key:String -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def iso_of source · line 87 · raw

@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def iso_at2 source · line 94 · raw

@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, U32>

def iso_at source · line 101 · raw

@+key:String -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def uint_of source · line 104 · raw

@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def uint_at2 source · line 107 · raw

@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, U32>

def uint_at source · line 114 · raw

@+key:String -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, U32>

def str_or source · line 117 · raw

@+m:Maybe<&2, String> -> @+d:String -> String

def opt_json_s source · line 124 · raw

@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, String>

def str_at source · line 131 · raw

@+key:String -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> String

def null_json source · line 134 · raw

0x0717344745a30ebad1f19045228e8f18/json.Json

def parsed source · line 138 · raw

@+r:Result<&2, &2, String, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> 0x0717344745a30ebad1f19045228e8f18/json.Json

A parsed value, JSON null when the text does not parse.

def parse_text source · line 145 · raw

@+t:String -> 0x0717344745a30ebad1f19045228e8f18/json.Json

def from_opt source · line 148 · raw

@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> 0x0717344745a30ebad1f19045228e8f18/json.Json

def get_or_null source · line 155 · raw

@+key:String -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/json.Json