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

strconv: fix format_fl()/format_es() (fix #13210) #22244

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Sep 18, 2024

This PR fix format_fl()/format_es() (fix #13210).

  • Fix format_fl()/format_es().
  • Add test.
fn main() {
	n := 0.1
	println('${n:36.2f}')
	println('${n:37.2f}')
	println('${n:38.2f}')
	println('${n:70.3f}')
}

PS D:\Test\v\tt1> v run .
                                0.10
                                 0.10
                                  0.10
                                                                 0.100

@medvednikov medvednikov merged commit fca336c into vlang:master Sep 18, 2024
73 checks passed
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.

Interpolating float into string with too large of a width returns unexpected result
3 participants