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

Enhance LogicValue.toRadixString to enable fixed-width output #583

Merged
merged 2 commits into from
Mar 17, 2025

Conversation

desmonddak
Copy link
Contributor

Description & Motivation

Enable printing of leading zeros to get fixed-width output to help with alignment during printing and for parsing
from strings without having to use the size prefix, just passing the radix along with a set of strings.

Related Issue(s)

#582

Testing

Added tests that enabled the leadingZero option and checked that they match as well as not breaking existing tests.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Yes. This option is off by default.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

Yes. An example was added to one of the user guide sections and the API for the method was updated.

@desmonddak
Copy link
Contributor Author

@mkorbel1 I think this may need review.

@mkorbel1 mkorbel1 linked an issue Mar 10, 2025 that may be closed by this pull request
Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a nice addition!

@desmonddak desmonddak requested a review from mkorbel1 March 17, 2025 20:33
@desmonddak
Copy link
Contributor Author

I think this is ready to merge.

Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@mkorbel1 mkorbel1 merged commit 71a0700 into intel:main Mar 17, 2025
3 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.

radixString should have an option to produce fixed-length strings
2 participants