From 2695dd2ca848365eca4d269b1c8f4b0e82c9a0f0 Mon Sep 17 00:00:00 2001 From: Menarul Alam Date: Wed, 10 Jan 2024 12:02:44 -0800 Subject: [PATCH] Added a sentence --- docs/string-interpolation-format-specification.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/string-interpolation-format-specification.md b/docs/string-interpolation-format-specification.md index a0416ca..1f16b68 100644 --- a/docs/string-interpolation-format-specification.md +++ b/docs/string-interpolation-format-specification.md @@ -12,7 +12,7 @@ Most languages allow for format specifiers such as python f-strings or printf in Under the hood, this will just be syntactic sugar in addition to the current implementation of interpolated strings. Before, interpolated strings were passed to `string.format` with no format was speified, but now we will also pass the optional format specifier. We decided on `,` to act as the delimiter for format specification. -To give some examples, this is how it would look like in code +To give some examples, this is how it would look like in code: ```lua balance = 100.2035 @@ -26,6 +26,8 @@ print(`12345 is 0x{number,x} in hex!`) ``` `12345 is 0x3039 in hex!` +This will support most additions that could be made to `string.format` in the future as well. + ## Drawbacks There are no clear drawbacks to this.