Project

General

Profile

« Previous | Next » 

Revision 7901

web/vegpath/util.php: Path: Made $tail default to ""

View differences:

util.php
25 25
	public $head;
26 26
	public $tail;
27 27
	
28
	function Path($head, $tail)
28
	function Path($head, $tail="")
29 29
	{
30 30
		$this->head = $head;
31 31
		$this->tail = $tail;
......
36 36
{
37 37
	$delim_idx = strpos($str, $delim);
38 38
	return $delim_idx !== false ? new Path(substr($str, 0, $delim_idx),
39
		substr($str, $delim_idx+strlen($delim))) : new Path($str, "");
39
		substr($str, $delim_idx+strlen($delim))) : new Path($str);
40 40
}
41 41

  
42 42
function parse_dot_path($path) { return partition($path, "."); }

Also available in: Unified diff