修改类库

This commit is contained in:
wuyanwen
2019-12-26 09:03:19 +08:00
parent 1dcce85c3a
commit 201cb455f5
4 changed files with 29 additions and 83 deletions

View File

@@ -1 +1,24 @@
<?php
namespace catcher;
use think\helper\Str;
class Utils
{
/**
* 字符串转换成数组
*
* @time 2019年12月25日
* @param string $string
* @param string $dep
* @return array
*/
public static function stringToArrayBy(string $string, $dep = ','): array
{
if (Str::contains($string, $dep)) {
return explode($dep, trim($string, $dep));
}
return [$string];
}
}