Skip to content

feat: Add Java 11 String.lines() method with tests#611

Open
OmPradnya wants to merge 1 commit into
javapathfinder:masterfrom
OmPradnya:feat/string-lines-method
Open

feat: Add Java 11 String.lines() method with tests#611
OmPradnya wants to merge 1 commit into
javapathfinder:masterfrom
OmPradnya:feat/string-lines-method

Conversation

@OmPradnya
Copy link
Copy Markdown

@OmPradnya OmPradnya commented Mar 17, 2026

This PR adds support for the Java 11 String method lines() in JPF

As recommended by @cyrille-artho in the thread conversation of issue #313

The tests were added first to see that the unit tests fail, implementation ensured the unit test is fixed, following the recommended workflow

This PR:
-implements lines() in String.java which returns Stream<String>
-handles line terminators: \n, \r, and \r\n
-adds unit tests, normal and edge cases( trailing newline and empty string)

Fixes #313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Methods are missing in String Class

1 participant