Revision 7898
Added by Aaron Marcuse-Kubitza almost 12 years ago
util.php | ||
---|---|---|
34 | 34 |
|
35 | 35 |
function partition($str, $delim) |
36 | 36 |
{ |
37 |
$delim_idx = strpos($delim, $str);
|
|
37 |
$delim_idx = strpos($str, $delim);
|
|
38 | 38 |
return $delim_idx !== false ? new Path(substr($str, 0, $delim_idx), |
39 | 39 |
substr($str, $delim_idx+strlen($delim))) : new Path($str, ""); |
40 | 40 |
} |
Also available in: Unified diff
web/vegpath/util.php: partition(): Fixed bug where strpos() actually does take the search-for param second rather than first (but returns false on no match)