Code Duplication    Length = 9-9 lines in 2 locations

htdocs/lib/clicompatbase.inc.php 2 locations

@@ 568-576 (lines=9) @@
565
function mb_trim($str)
566
{
567
    $bLoop = true;
568
    while ($bLoop == true) {
569
        $sPos = mb_substr($str, 0, 1);
570
571
        if ($sPos == ' ' || $sPos == "\r" || $sPos == "\n" || $sPos == "\t" || $sPos == "\x0B" || $sPos == "\0") {
572
            $str = mb_substr($str, 1, mb_strlen($str) - 1);
573
        } else {
574
            $bLoop = false;
575
        }
576
    }
577
578
    $bLoop = true;
579
    while ($bLoop == true) {
@@ 579-587 (lines=9) @@
576
    }
577
578
    $bLoop = true;
579
    while ($bLoop == true) {
580
        $sPos = mb_substr($str, -1, 1);
581
582
        if ($sPos == ' ' || $sPos == "\r" || $sPos == "\n" || $sPos == "\t" || $sPos == "\x0B" || $sPos == "\0") {
583
            $str = mb_substr($str, 0, mb_strlen($str) - 1);
584
        } else {
585
            $bLoop = false;
586
        }
587
    }
588
589
    return $str;
590
}