Class String
Namespace: application\core\utils
Copyright: Copyright © 2012-2013 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/core/utils/String.php
Copyright: Copyright © 2012-2013 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/core/utils/String.php
Methods summary
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
#
istrpos( string $string, array $arr, boolean $returnValue = false )
字符串方式实现 preg_match("/(s1|s2|s3)/", $string, $match) |
public static
mixed
|
|
public static
string
|
#
authCode( string $string, string $operation = 'DECODE', string $key = '', integer $expiry = 0 )
对字符串进行加密和解密 |
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
integer
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
array
|
#
splitParam( string $param )
分割参数字符串返回数组。方便url组件创建URL $param = 'a=3&b=4'; $splitParam = String::splitParam($param); |
public static
array
|
|
public static
string
|
#
passwordMask( string $password )
把密码字符串转换为可显示的形式 $password = '19881014'; echo String::passwordMask($password); // returns '1********14'; |
public static
mixed
|
|
public static
string
|
#
getTree( array $data, string $format = "<option value='\$catid' \$selected>\$spacer\$name</option>", integer $id = 0, string $nbsp = ' ', array $icon = array( ' ', ' ', ' ' ) )
封装Tree类,快速获取有层级的分类树 $format = "<option value='\$catid' \$selected>\$spacer\$name</option>"; $data = Ibos:app()->setting->get('cache/positioncategory'); $trees = String::getTree($data,$format); |
public static
array
|
|
public static
array
|
|
public static
string
|
#
wrapId( array $ids, string $identifier = 'u', string $glue = ',' )
封装id加上前缀 $id = array(23,24,25,26); print_r(String::wrapId($id)); return 'u_23,u_24,u_25,u_26'; |
public static
array
|
|
public static
integer
|
|
public static
|
|
public static
|
|
public static
integer
|
|
public static
string
|
|
public static
type
|
|
public static
string
|
|
public static
string
|
|
public static
type
|
|
public static
type
|
|
public static
string
|
|
public static
type
|
|
public static
|
|
public static
string
|
|
public static
|
|
public static
string
|
|
public static
type
|