Skip to content

v2.4.0

Compare
Choose a tag to compare
@Awilum Awilum released this 05 Dec 11:34
  • add copy() method.

  • add ability to extend Strings class with Macros.

    use Atomastic\Strings\Strings;
    use Atomastic\Macroable\Macroable;
    
    Strings::macro('concatenate', function(string $string) {
        return $this->toString() . $string;
    });
    
    $strings = new Strings('Hello');
    
    echo $strings->concatenate(' World'));