Water 5-Common Data Types-Number
method number.integer.from
Contract
Return typewob
Parameter keyDefault valueType
a_wobreq
radix10integer
direction"nearest"type.<one_of "nearest" "up" "down" "towards_zero"/>
Water Contract
<method number.integer.from
  a_wob    =req
  radix    =10
  direction="nearest"=<type.one_of "nearest" "up" "down" "towards_zero"/>/>

null and false are converted to 0. true is converted to 1. integers convert to themselves. number.double s are converted to the integer immediately above it or below it depending on the direction argument which may be: "nearest" "towards_zero" "up" "down" . chars are converted to their ASCII equivalent. strings are read as a string of digits (with optional leading minus sign) Everything else errors.
integer.<from false/>0
integer.<from "123"/>123
integer.<from <char "a"/>/>97
integer.<from 12.3 direction="up"/>
13
integer.from can also take a radix argument to provide a base for conversion of strings.
integer.<from "A" radix=16/>10