Skip to content
This repository was archived by the owner on Sep 28, 2018. It is now read-only.

Releases: phpgearbox/string

Added `format()`

Choose a tag to compare

@brad-jones brad-jones released this 30 Nov 23:56

While the StringBuilder has sprintf format helpers, the main Str class did not. Well now it does.

Str::s('There are %d monkeys in the %s')->format([5, 'tree']); // There are 5 monkeys in the tree

Removed one method and added another.

Choose a tag to compare

@brad-jones brad-jones released this 29 Nov 06:13
  • replaceExact() was removed. I have no idea what I was thinking when I created it. Talk about over complicating things.
  • is() has been added. Borrowed from Laravels str_is() method. Basically a poor mans wildcard regular expression.

Alright lets release this already.

Choose a tag to compare

@brad-jones brad-jones released this 23 Sep 08:20

I have been using this myself for ages now, so too have a few other people by the looks of the packigist stats, 2k worth of downloads, I'm flattered :)

Ideally I would have liked to polish off the documentation further but that will come with time.