Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method lineCount() string helper #54249

Closed
wants to merge 3 commits into from
Closed

Conversation

mrvipchien
Copy link

This PR adds the lineCount method to string helper. It can count lines, supports a param to include/exclude empty lines and handle mixed line endings between Windows and Linux

@mrvipchien mrvipchien changed the title Add method lineCount() string helper [11.x] Add method lineCount() string helper Jan 18, 2025
@mrvipchien mrvipchien changed the title [11.x] Add method lineCount() string helper Add method lineCount() string helper Jan 18, 2025
src/Illuminate/Support/Str.php Outdated Show resolved Hide resolved
src/Illuminate/Support/Str.php Outdated Show resolved Hide resolved
src/Illuminate/Support/Str.php Outdated Show resolved Hide resolved
mrvipchien and others added 2 commits January 19, 2025 03:33
Co-authored-by: Sebastian Hädrich <11225821+shaedrich@users.noreply.github.com>
Co-authored-by: Sebastian Hädrich <11225821+shaedrich@users.noreply.github.com>
@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

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.

3 participants