php-extended/polyfill-php74-mb-str-split

A polyfill that adds the mb_str_split function added in php7.4 to previous versions of php

1.1.0 2022-05-31 07:32 UTC

This package is auto-updated.

Last update: 2022-07-31 00:31:39 UTC


README

A polyfill that adds the php74 mb_str_split function added in php7.4 to previous versions of php.

coverage build status

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/polyfill-php74-mb-str-split": "^1",
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

Basic Usage

This library gives the function mb_str_split(string $string , int $length = 1 , ?string $encoding = null) : string[] :


$res = \mb_str_split('foobar', 3, 'UTF-8');
// $res is ['foo', 'bar']

License

MIT (See license file).