Revision 7908
Added by Aaron Marcuse-Kubitza almost 12 years ago
util.php | ||
---|---|---|
39 | 39 |
substr($str, $delim_idx+strlen($delim))) : new Path($str); |
40 | 40 |
} |
41 | 41 |
|
42 |
function array_non_empty($array) |
|
43 |
{ |
|
44 |
foreach ($array as $key => $value) |
|
45 |
if (!isset($value) || $value === "") unset($array[$key]); |
|
46 |
return $array; |
|
47 |
} |
|
48 |
|
|
49 |
function join_non_empty($delim, $array) |
|
50 |
{ |
|
51 |
return implode($delim, array_non_empty($array)); |
|
52 |
} |
|
53 |
|
|
42 | 54 |
function parse_dot_path($path) { return partition($path, "."); } |
43 | 55 |
|
44 | 56 |
function parse_mixed_path($path) |
Also available in: Unified diff
web/vegpath/util.php: Added array_non_empty(), join_non_empty()