\ticky\helperstr

Summary

Methods
Properties
Constants
cut()
random()
nl2br()
quote()
underline2camel()
camel2underline()
clearBom()
pinyin()
No public properties found
single
double
back
comma
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

single

single = 1

double

double = 2

back

back = 3

comma

comma = 4

Methods

cut()

cut(  $str,   $length, string  $fix = '...') : string

截取指定长度字符串

Parameters

$str
$length
string $fix

Returns

string

random()

random(integer  $length = 4, integer  $type) : string

生成指定长度随机字符串

Parameters

integer $length
integer $type

Returns

string

nl2br()

nl2br(  $str) 

Parameters

$str

quote()

quote(  $str,   $type = 1) : string

给字符串添加引号

Parameters

$str
$type

Returns

string

underline2camel()

underline2camel(  $str, string  $type = 'lower') : string

下划线转驼峰

Parameters

$str
string $type

Returns

string

camel2underline()

camel2underline(  $str) : string

驼峰转下划线

Parameters

$str

Returns

string

clearBom()

clearBom(  $str) : string

Parameters

$str

Returns

string

pinyin()

pinyin(  $str) : mixed

Parameters

$str

Returns

mixed