(PHP 4 >= 4.0.6, PHP 5, PHP 7)
mb_strcut — ��ȡ�ַ���һ����
$str
, int $start
[, int $length = NULL
[, string $encoding = mb_internal_encoding()
]] ) : stringmb_strcut() �� mb_substr() ���ƣ����Ǵ��ַ�������ȡ���ַ��������ǰ��ֽ�����ִ�У��������ַ������� ����ض�λ��λ�ڶ��ֽ��ַ������ֽڵ��м䣬���ڸ��ַ��ĵ�һ���ֽڿ�ʼִ�С� ��Ҳ�Ǻ� substr() �����IJ�֮ͬ�������ؽ��ַ������ֽ�֮��ضϣ��⽫����һ�����ε��ֽ����С�
strҪ�ضϵ� string��
start
��� start ���Ǹ��������ص��ַ������ str �ĵ� start �ֽ�λ�ÿ�ʼ���� 0 ��ʼ�������ٸ����ӣ��ַ��� 'abcdef'���ֽ�λ�� 0 ���ַ��� 'a'���ֽ�λ�� 2 ���ַ���
'c'���Դ����ơ�
��� start �Ǹ��������ص��ַ����Ǵ� str ĩβ���� start ���ֽڿ�ʼ�ġ�
length�ֽ����ȡ�If omitted or NULL is passed, extract all bytes to the end of the string.
encodingencoding
����Ϊ�ַ����롣���ʡ�ԣ���ʹ���ڲ��ַ����롣
mb_strcut() ���� start �� length �������� str ��һ���֡�
| �汾 | ˵�� |
|---|---|
| 5.4.8 |
Passing NULL as length
extracts all bytes to the end of the string. Prior to this version
NULL was treated the same as 0.
|