Is your feature request related to a problem? Please describe.
As discussed in PR #335 there does need to be a way to format values for inline expressions.
This offers an alternate approach, using a new built in function that will take in two parameters, a format string (syntax to be determined) and a value of any type.
It will return a string formatted appropriately.
Describe the solution you'd like
So the following line in Yarn dialogue
Number: {format("%04d", 86)}
Would be rendered as:
Number: 0086
Describe alternatives you've considered
Alternatives are discussed and proposed in PR #335 and take the form of either creating new markup or adding new language syntax for inline expressions.
Additional context
Thanks to @salyu9 and @st-pasha for their discussion and contributions to this.
Is your feature request related to a problem? Please describe.
As discussed in PR #335 there does need to be a way to format values for inline expressions. This offers an alternate approach, using a new built in function that will take in two parameters, a format string (syntax to be determined) and a value of any type. It will return a string formatted appropriately.
Describe the solution you'd like
So the following line in Yarn dialogue
Number: {format("%04d", 86)}
Would be rendered as:
Number: 0086
Describe alternatives you've considered
Alternatives are discussed and proposed in PR #335 and take the form of either creating new markup or adding new language syntax for inline expressions.
Additional context
Thanks to @salyu9 and @st-pasha for their discussion and contributions to this.