Skip to content

Allow format strings in ThisAssembly.Strings - #313

Merged
kzu merged 1 commit into
mainfrom
format
Jun 9, 2024
Merged

Allow format strings in ThisAssembly.Strings#313
kzu merged 1 commit into
mainfrom
format

Conversation

@kzu

@kzukzu commented Jun 9, 2024

Copy link
Copy Markdown
Member

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
@kzukzu added the enhancement New feature or request label Jun 9, 2024
@kzu
kzu merged commit 16098d8 into mainJun 9, 2024
@kzu
kzu deleted the format branch June 9, 2024 06:38
@devloopeddevlooped locked and limited conversation to collaborators Sep 2, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow format strings in ThisAssembly.Strings

1 participant

@kzu