HealthSamurai / jute.clj

XSLT for hipsters
MIT License
25 stars 8 forks source link

toInt converts string only, impossible to convert dec to int #29

Open ruscoder opened 1 year ago

ruscoder commented 1 year ago

Hi! myint: $ toInt(185.5) always returns 185.5

ruscoder commented 1 year ago

Workaround:

  decToInt:
    $fn:
      - x
    $name: decToInt
    $body: $ toInt(replace(toString(x), '\..+', ''))