Skip to content

Conversation

@kzu
Copy link
Member

@kzu kzu commented Jun 9, 2024

The following are now valid and produce the expected results, just as an equivalent interpolated string would:

  • expires on {date:yyyy-MM-dd}
  • expires on year {date:yyyy} (wait until {date:MM}
  • expires on {0:yyyy-MM}

Note how the same argument name can be used multiple times with different output formatting for increased flexibility and arg reuse.

Fixes #299

The following are now valid and produce the expected results, just as an equivalent interpolated string would:

- `expires on {date:yyyy-MM-dd}`
- `expires on year {date:yyyy} (wait until {date:MM}`
- `expires on {0:yyyy-MM}`

Note how the same argument name can be used multiple times with different output formatting for increased flexibility and arg reuse.

Fixes #299
@kzu kzu added the enhancement New feature or request label Jun 9, 2024
@kzu kzu merged commit 16098d8 into main Jun 9, 2024
@kzu kzu deleted the format branch June 9, 2024 06:38
@devlooped devlooped locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow format strings in ThisAssembly.Strings

2 participants