Not signed in (Sign In)
 
 
Aug 10th 2008
 
Decited solution was to enable arrays of protocols to be passed to PrependString, and if non match, prepend the first:

function PrependString($Prepend, $String) {
if ($String == '') return '';

if (is_array($Prepend)){
foreach ($Prepend as $str) {
$pos = strpos(strtolower($String), strtolower($str));
if ($pos !== false && $pos == 0) {
$Prepend = '';
}
}
// If the string doesn't start with any array elements, prepend the first element
if ($Prepend <> '') $Prepend = $Prepend[0];
} else {
$pos = strpos(strtolower($String), strtolower($Prepend));
if ($pos !== false && $pos == 0) $Prepend = '';
}

return $Prepend.$String;
}
 
Aug 10th 2008
 
Framework: r156
People r101

Issue information

  • 69
  • WallPhone

    WallPhone

    Bug Tracker

  • Resolved
  • Low
  • Bug

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.