2.1.0
Added
- Added
Str::make()
method for static constructing (thanks @roykesserwani) - Added
Str::urlencode()
method - Added
Str::bcrypt()
method - Added
Str::encrypt()
andStr::decrypt()
methods - Added
Str::truncate()
method (thanks @roykesserwani) - Added
Str::similarity()
method (thanks @ernst01) - Added
Str::hex()
method- Added
Str::hexEncode()
andStr::hexDecode()
aliases
- Added
- Added
Str::first()
andStr::last()
aliases forStr::substring()
- Added support for serializing (and unserializing) a
Twine\Str
object - Added support for
json_encode
-ing aTwine\Str
object (they will be converted to a string) (thanks @erikverbeek)
Changed
- Cast the value passed to the
Str()
constructor to a string
Fixed
- Fixed trait name misspelling:
Twine\Traits\Convinience
→Twine\Traits\Convenience
- Fixed
Str::insensitiveMatch()
not returning anything - Fixed
Str::lowercase(Twine\Config\Lowercase::WORDS)
not working on strings following tabs and newline characters (thanks @dhrrgn)
Other
- Optimized
Str::lowercase(Twine\Config\Lowercase::WORDS)
when acting on a long string (thanks @dhrrgn) - Optimized
Str::hex()
method when acting on long a string (thanks @dhrrgn)
Detailed changelog: 2.0.0...2.1.0