Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Are there string parsing functions in Daml?Forum ↗

Are there string parsing functions in Daml?

App Development3 posts288 views1 likesLast activity Feb 2022
GE
georgOP
Feb 2022

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)?

LU
Luciano
Feb 2022 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!)

GE
georg
Feb 2022

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

← Back to Discussions