[PR #666] [MERGED] Add String.splitLimit API #663

Closed
opened 2025-12-30 01:26:01 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/666
Author: @HT154
Created: 10/1/2024
Status: Merged
Merged: 10/7/2024
Merged by: @holzensp

Base: mainHead: string-split-limit


📝 Commits (2)

📊 Changes

5 files changed (+133 additions, -48 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/stdlib/base/StringNodes.java (+16 -0)
📝 pkl-core/src/test/files/LanguageSnippetTests/input/api/string.pkl (+13 -0)
📝 pkl-core/src/test/files/LanguageSnippetTests/output/api/reflectedDeclaration.pcf (+79 -48)
📝 pkl-core/src/test/files/LanguageSnippetTests/output/api/string.pcf (+10 -0)
📝 stdlib/base.pkl (+15 -0)

📄 Description

Open to naming input here!

  • Java, Kotlin, and Swift use an overload of String.split for this
  • Golang calls this SplitN
  • Python uses a defaulted argument on str.split

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/666 **Author:** [@HT154](https://github.com/HT154) **Created:** 10/1/2024 **Status:** ✅ Merged **Merged:** 10/7/2024 **Merged by:** [@holzensp](https://github.com/holzensp) **Base:** `main` ← **Head:** `string-split-limit` --- ### 📝 Commits (2) - [`ac187fa`](https://github.com/apple/pkl/commit/ac187fad561197baaa80ee7b7e626461ebf23913) Add String.splitLimit API - [`92b482a`](https://github.com/apple/pkl/commit/92b482a7699f5f936d96b95d615d0e29b5b13d54) Update stdlib/base.pkl ### 📊 Changes **5 files changed** (+133 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/stdlib/base/StringNodes.java` (+16 -0) 📝 `pkl-core/src/test/files/LanguageSnippetTests/input/api/string.pkl` (+13 -0) 📝 `pkl-core/src/test/files/LanguageSnippetTests/output/api/reflectedDeclaration.pcf` (+79 -48) 📝 `pkl-core/src/test/files/LanguageSnippetTests/output/api/string.pcf` (+10 -0) 📝 `stdlib/base.pkl` (+15 -0) </details> ### 📄 Description Open to naming input here! * Java, Kotlin, and Swift use an overload of `String.split` for this * Golang calls this [`SplitN`](https://pkg.go.dev/strings#SplitN) * Python uses a defaulted argument on `str.split` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:26:01 +01:00
adam closed this issue 2025-12-30 01:26:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#663