`String.split` omits final empty string(s) for trailing pattern
Open
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
Reproduced in 0.29.0.
Reproducer:
```pkl
// Expected: List("", "c", "", "")
// Got: List("", "c")
"abcababab".split("ab")
// Works as expected: List("", "1")
".1".split(".")
// Expected: List("", "1", "")
// Got: List("", "1")
".1.".split(".")
```
Empty strings will be omitted from the end no matter how many times you repeat the pattern.
Contributor guide
Research direction
Start by running the Pkl reproducer from the issue and locating the String.split implementation and its existing tests. Done means trailing empty strings are preserved for repeated trailing patterns while the shown non-trailing cases continue to produce their expected lists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100