2017 © Pedro Peláez
 

library string-builder

String builder class for PHP.

image

hiroto-k/string-builder

String builder class for PHP.

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • -76 % Grown

The README.md

php-string-builder

PHP from Packagist License, (*1)

String builder class for PHP., (*2)

<?php

$str = 'Your String';

// Normal PHP.
// Display 'MY STRING'.
echo mb_strtoupper(str_replace('Your', 'My', $str), 'utf-8');

// Using this library.
// Display 'MY STRING'.
use HirotoK\StringBuilder\StringBuilder;

echo StringBuilder::make($str)->replace('Your', 'My')->upcase();

Requirements

  • PHP 7.0 or later
  • mbstring extension

Installation

1, Download this library

Modify require directive in composer.json., (*3)

{
  "require": {
    "hiroto-k/string-builder": "1.*"
  }
}

OR, (*4)

$ composer require hiroto-k/php-string-builder

2, Load vendor/autoload.php file

Load vendor/autoload.php in your codes., (*5)

3, Use StringBuilder class

<?php

// Load composer packages.
require "vendor/autoload.php";

// Using StringBuilder class.
use HirotoK\StringBuilder\StringBuilder;

// Create StringBuilder object.
$sb = new StringBuilder('Your string');

// Alias of '__construct'.
// This method is useful to method chain.
$sb = StringBuilder::make('Your string');

License

MIT License, (*6)

The Versions

19/07 2018

dev-master

9999999-dev

String builder class for PHP.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

string builder

12/06 2018

1.0.0

1.0.0.0

String builder class for PHP.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

string builder

26/03 2018

2.0.0

2.0.0.0

String builder for PHP.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

string builder

22/04 2017

1.2.0

1.2.0.0

String builder for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-mbstring *

 

The Development Requires

string builder

02/10 2016

1.1.1

1.1.1.0

String builder for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-mbstring *

 

The Development Requires

string builder

18/07 2016

1.1.0

1.1.0.0

String builder for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-mbstring *

 

The Development Requires

string builder