Add split_lines() to CPHP

feature/node-rewrite
Sven Slootweg 12 years ago
parent f2c92c3ac9
commit e2804c45a5

@ -18,6 +18,18 @@ function split_whitespace($input)
return preg_split("/\s+/", $input);
}
function split_lines($input)
{
$lines = explode("/n", $input);
foreach($lines as &$line)
{
$line = trim($line);
}
return $lines;
}
function shrink_command($command)
{
$command = preg_replace("/(\t+|\n)/", " ", $command);

Loading…
Cancel
Save