Navigation Menu

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

[7.x] Introduced basic padding (both, left, right) methods to Str and Stringable… #34053

Merged
merged 2 commits into from Aug 28, 2020

Conversation

telkins
Copy link
Contributor

@telkins telkins commented Aug 28, 2020

Basically, this brings PHP's str_pad() into Laravel's Str and Stringable classes. I looked quickly for such support in the code and the docs and couldn't find any. Likewise, I couldn't find any previous PRs (accepted or rejected) that mentioned str_pad.

I added tests, but no documentation. I don't mind updating the docs once I know it's likely to be accepted. Hopefully that makes sense.

I explicitly provided the pad type argument when it matches the default. I thought about removing it, but decided that being explicit might be the better choice after all.

Any feedback is welcome.

Thx. 🤓

@telkins telkins changed the title Introduced basic padding (both, left, right) methods to Str and Stringable… [7.x] Introduced basic padding (both, left, right) methods to Str and Stringable… Aug 28, 2020
@taylorotwell taylorotwell merged commit 6891cb5 into laravel:7.x Aug 28, 2020
@driesvints
Copy link
Member

@telkins can you also PR these to the docs? Thanks!

@telkins
Copy link
Contributor Author

telkins commented Aug 28, 2020

@telkins can you also PR these to the docs? Thanks!

@driesvints Only if I can get my hands on Blade UI Kit...right now...! 😜

Kidding...of course. I'll try to get that done this weekend, if that's OK.

Thx.

@telkins
Copy link
Contributor Author

telkins commented Aug 28, 2020

I'll try to get that done this weekend, if that's OK.

@driesvints I just decided to try to get it out of the way right now. Hope it's OK.

laravel/docs#6283

Thx.

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.

None yet

3 participants