public static function trimPattern($value, array $params)
    {
        if (empty($value) || empty($params['pattern'])) {
            return $value;
        }
        $params['limit'] = Helper::getValue($params['limit'], -1);
        return StringHelper::trimPattern($value, $params['pattern'], $params['limit']);
    }