[eluser]louis w[/eluser]
This helper function will not strip out double slashes if they are at the beginning of the line. Caused quite a headache for me to track this down. Had to change all my calls to reduce_multiples instead to get it to work.
Code:
$path = reduce_double_slashes('//path/to/file');
echo $path;
// //path/to/file