Skip to content

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

Merged
taylorotwell merged 2 commits into
laravel:7.xfrom
telkins:7.x
Aug 28, 2020
Merged

[7.x] Introduced basic padding (both, left, right) methods to Str and Stringable…#34053
taylorotwell merged 2 commits into
laravel:7.xfrom
telkins:7.x

Conversation

@telkins

@telkins telkins commented Aug 28, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

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

@telkins

telkins commented Aug 28, 2020

Copy link
Copy Markdown
Contributor Author

@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

telkins commented Aug 28, 2020

Copy link
Copy Markdown
Contributor Author

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.

3 participants