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

Add support for more forms of format specifications #144

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

udoprog
Copy link
Collaborator

@udoprog udoprog commented Oct 9, 2020

This adds support for more formatting specifications. In principle almost everything should parse and be communicated to the internal FormatSpec type, but not everything is implemented yet.

However, the following things are implemented for strings and numbers:

  • fill character
  • alignment <, ^, >.
  • zero-aware filling (for numbers only)
  • display and debug formatting
  • hex (upper and lower) and binary formatting (integers only)
  • positive and negative sign spec (numbers only)

I'll added more test cases here:
https://github.com/rune-rs/rune/pull/144/files#diff-1a0bb1364e0488bce0d80ecf20950d8e

And more to follow.

@udoprog udoprog added the enhancement New feature or request label Oct 9, 2020
@udoprog udoprog merged commit a8e4944 into master Oct 9, 2020
@udoprog udoprog deleted the more-format-specs branch October 9, 2020 17:42
@udoprog udoprog added the changelog Issue has been added to the changelog label Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Issue has been added to the changelog enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant