@@ 42-50 (lines=9) @@ | ||
39 | return trim($file, '.'); |
|
40 | } |
|
41 | ||
42 | public static function csplit($input, $delimiter = ',') |
|
43 | { |
|
44 | if (is_array($input)) { |
|
45 | return $input; |
|
46 | } |
|
47 | $res = explode($delimiter, $input); |
|
48 | ||
49 | return array_values(array_filter(array_map('trim', $res))); |
|
50 | } |
|
51 | ||
52 | public static function asplit($input) |
|
53 | { |
|
@@ 52-60 (lines=9) @@ | ||
49 | return array_values(array_filter(array_map('trim', $res))); |
|
50 | } |
|
51 | ||
52 | public static function asplit($input) |
|
53 | { |
|
54 | if (is_array($input)) { |
|
55 | return $input; |
|
56 | } |
|
57 | $res = preg_split('/[\s,]+/', $input); |
|
58 | ||
59 | return array_values(array_filter(array_map('trim', $res))); |
|
60 | } |
|
61 | ||
62 | public static function ksplit($input, $delimiter = ',') |
|
63 | { |