Skip to content

String formatting in .slint #3684

Answered by ogoffart
Blquinn asked this question in Q&A
Oct 16, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Right now you can do: "" + (Math.round(2.342342525 * 100) / 100)

We do need better way to do such formatting, and i think it could be done in a locale definite way through the @tr() macro in the future.

(slightly related: #3597 and #586 )

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Blquinn
Comment options

Answer selected by Blquinn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants