Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New STR_FORMAT function #461

Merged
merged 2 commits into from
Apr 21, 2024
Merged

New STR_FORMAT function #461

merged 2 commits into from
Apr 21, 2024

Conversation

oswaldobapvicjr
Copy link
Contributor

@oswaldobapvicjr oswaldobapvicjr commented Apr 5, 2024

This PR creates a new String function STR_FORMAT(format [, argument, ...]) which can be used to produce formatted strings. For example:

STR_FORMAT("Greetings from %s!", "Brazil")
Result: "Greetings from Brazil!"

"STR_FORMAT("%.2f %s", 11.1, "EUR")
Result: "11.10 EUR"

It can be useful to apply some formatting from numbers to strings.

Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@uklimaschewski uklimaschewski merged commit a396401 into ezylang:main Apr 21, 2024
2 checks passed
@uklimaschewski
Copy link
Collaborator

I merged it, though I see a problem with the (non-) usage of a locale here (and also in the already existing date functions).
To fix this problems, I will introduce a configurable locale to the expression configuration.
This will also allow to get rid of the ugly static locale setting in the test.

@oswaldobapvicjr oswaldobapvicjr deleted the pr-4 branch April 22, 2024 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants