rfc:mb_str_split

This is an old revision of the document!


PHP RFC: mb_str_split

Introduction

mb_str_split is a function to perform string splitting to an array of defined size chunks.

Description

array mb_str_split ([ string $string [, integer $split_length = 1, string $encoding = mb_internal_encoding() ]] )¶

The function works through the library libmbfl and supports all mbstring supported charsets just like other mbstring functions.

Usage example

<?php 
print_r(mb_str_split("победа", 2));
 
--EXPECT--
 
Array
(
    [0] => по
    [1] => бе
    [2] => да
)

Proposal

Include function into the existent mbstring extension.

Proposed PHP Version(s)

next PHP-7.x

RFC Impact

To Existing Extensions

mbstring

To Opcache

Opcache is not affected.

New Constants

No.

Open Issues

No.

Future Scope

No.

Proposed Voting Choices

Include mb_str_split into next PHP-7.x This project requires 50%+1 majority. The voting period: from 2019-01-05 to 2019-01-15.

mb_str_split
Real name Yes No
Count: 0 0

Patches and Tests

Implementation

rfc/mb_str_split.1546726820.txt.gz · Last modified: 2019/01/05 22:20 by rumi