public static function trim($string, $side = self::TRIM_BOTH, $chars = null)
    {
        if ($side == self::TRIM_START) {
            return ltrim($string, $chars);
        } elseif ($side == self::TRIM_END) {
            return rtrim($string, $chars);
        } elseif ($side == self::TRIM_BOTH) {
            return trim($string, $chars);
        }
    }