\orgZh2py

Summary

Methods
Properties
Constants
encode()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$_aMaps
N/A

Properties

$_aMaps

$_aMaps : array

拼音字符转换图

Type

array

Methods

encode()

encode(string  $str, string  $ret_format = 'head', string  $placeholder = '*', string  $allow_chars = '/[a-zA-Z\d]/') : string

将中文编码成拼音

Parameters

string $str

utf8字符串

string $ret_format

返回格式 [all:全拼音|head:首字母|one:仅第一字符首字母]

string $placeholder

无法识别的字符占位符

string $allow_chars

允许的非中文字符

Returns

string —

拼音字符串