Exemple #1
0
 public static function RemoveDoubleWhitespace($ParameterText)
 {
     $ReturnValue = $ParameterText;
     $Replaced = False;
     do {
         $ReturnValue = Str_IReplace('  ', ' ', $ReturnValue);
         if (SubStr_Count($ReturnValue, '  ') === 0) {
             $Replaced = True;
         }
     } while ($Replaced === False);
     return $ReturnValue;
 }
Exemple #2
0
    $Out = Comp_Load('Formats/String', $jParams['Message'], 20);
    if (Is_Error($Out)) {
        return ERROR | @Trigger_Error(500);
    }
    #-------------------------------------------------------------------------------
    return $Out;
    #-------------------------------------------------------------------------------
} elseif ($Type == 'SendToIDs') {
    #-------------------------------------------------------------------------------
    $SendedIDs = StrLen($jParams['SendedIDs']) > 0 ? SPrintF(' %s ', SubStr_Count($jParams['SendedIDs'], ',') + 1) : '0';
    $SendToIDs = StrLen($jParams['SendToIDs']) > 0 ? SPrintF(' %s ', SubStr_Count($jParams['SendToIDs'], ',') + 1) : '0';
    #-------------------------------------------------------------------------------
    return SPrintF(' %s ', $SendedIDs + $SendToIDs);
    #-------------------------------------------------------------------------------
} elseif ($Type == 'SendedIDs') {
    #-------------------------------------------------------------------------------
    if (isset($jParams['SendedIDs']) && StrLen($jParams['SendedIDs']) > 0) {
        #-------------------------------------------------------------------------------
        return SPrintF(' %s ', SubStr_Count($jParams['SendedIDs'], ',') + 1);
        #-------------------------------------------------------------------------------
    } else {
        #-------------------------------------------------------------------------------
        return ' 0 ';
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return $jParams;
#-------------------------------------------------------------------------------