CodeIgniter Forums
reduce_double_slashes with strings beginning with // - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: reduce_double_slashes with strings beginning with // (/showthread.php?tid=14639)



reduce_double_slashes with strings beginning with // - El Forum - 01-09-2009

[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