Skip to content
CCPEDIAby Unity Nodes
App Development

Are there string parsing functions in Daml?

3 posts297 views1 likesLast activity Feb 2022

  1. georgOP

    Are there any functions in Daml to go from Text → Optional Decimal for example? If not, is there maybe Haskell code I could use (ie. copy)?

  2. Luciano 1

    You want DA.Text. In your case parseDecimal does what you want. (Remember you can also use the search function in the docs using type signatures. Search for Text -> Optional Decimal should find this for you!)

  3. georg

    Ah right - I was searching for Text -> Decimal and nothing came up. Makes sense, thanks!