public static function pad($input, $length = 0)
    {
        $input = ltrim($input, '0');

        if ($input == '') {
            $input = '0';
        }

        return str_pad($input, $length, '0', STR_PAD_LEFT);
    }