mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 23:23:37 +01:00
[PR #578] [MERGED] Allow to String#toInt() to parse a string including "__"
#627
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/578
Author: @taichi-ishitani
Created: 7/13/2024
Status: ✅ Merged
Merged: 7/15/2024
Merged by: @stackoverflow
Base:
main← Head:fix_string_to_int📝 Commits (1)
3028a4dAllow to toInt() to parse a string including "__"📊 Changes
3 files changed (+12 additions, -4 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/stdlib/base/StringNodes.java(+2 -2)📝
pkl-core/src/test/files/LanguageSnippetTests/input/api/string.pkl(+6 -2)📝
pkl-core/src/test/files/LanguageSnippetTests/output/api/string.pcf(+4 -0)📄 Description
A Int literal can include sequence of "_" like below.
However,
String#toInt()method cannot parse such string.This PR is to fix this issue.
Refs: https://github.com/apple/pkl/discussions/577#discussion-6927552
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.