Int format #577
Int format
#577
-
I have a question about Int format. Following Pkl code can be parsed as Int. a = 1_2__3__ But an error will be reported for the Pkl code below. a = "1_2__3__".toInt() Which behavior is correct? |
Beta Was this translation helpful? Give feedback.
Answered by
bioball
Jul 12, 2024
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
taichi-ishitani
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1_2__3__
is a valid int literal, with underscore separators. It probably makes sense forString#toInt()
to be able to parse these values.