Skip to content

#fmt strings should allow index of argument, count, and precision to be specified #1651

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

Closed
brson opened this issue Jan 24, 2012 · 5 comments
Closed
Labels
A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 24, 2012

printf allows things like "%_d", "%2$_1$d" to allow its arguments to be used as the count/precision, etc.

@nikomatsakis
Copy link
Contributor

I suppose this is still relevant, though I think we plan to revamp fmt! somewhat so it is a bit more modern and not so tied to printf.

@bstrie
Copy link
Contributor

bstrie commented May 29, 2013

@nikomatsakis By "revamp" are you referring to a rewrite of the implementation, or a full-fledged change to the design, e.g. to something like C#'s (http://msdn.microsoft.com/en-us/library/system.string.format.aspx?cs-save-lang=1&cs-lang=csharp) ? If the latter, is there a bug for that?

@nikomatsakis
Copy link
Contributor

I was thinking of this mailing list thread that sort of crashed on the rocks of i18n. I don't know that there is a bug for this.

@huonw
Copy link
Member

huonw commented May 30, 2013

@nikomatsakis it also crashed on the rocks of @Aatch and I having non-Rust work and generally getting distracted. (It's something I'm planning to come back to, not sure about @Aatch.) But the work we've done so far is in this branch.

(We were both "ignoring" the i18n stuff, working on the assumption that that would be a heavier weight interface to writing output, and that a printf-style one is still desired.)

@nikomatsakis
Copy link
Contributor

@nikomatsakis it also crashed on the rocks of @Aatch and I having non-Rust work and generally getting distracted. (It's something I'm planning to come back to, not sure about @Aatch.) But the work we've done so far is in this branch.

cool, I liked the direction you guys were going in.

Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants