Skip to content

2.1.0

Compare
Choose a tag to compare
@PHLAK PHLAK released this 21 Jul 05:53
· 167 commits to master since this release
d116a40

Added

  • Added Str::make() method for static constructing (thanks @roykesserwani)
  • Added Str::urlencode() method
  • Added Str::bcrypt() method
  • Added Str::encrypt() and Str::decrypt() methods
  • Added Str::truncate() method (thanks @roykesserwani)
  • Added Str::similarity() method (thanks @ernst01)
  • Added Str::hex() method
    • Added Str::hexEncode() and Str::hexDecode() aliases
  • Added Str::first() and Str::last() aliases for Str::substring()
  • Added support for serializing (and unserializing) a Twine\Str object
  • Added support for json_encode-ing a Twine\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\ConvinienceTwine\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