src/Lib/StringTool.php
public static function ensure_end_with($string, $trailing_string)
    {
        if (StringTool :: end_with($string, $trailing_string))
        {
            return $string;
        }
        else
        {
            return $string . $trailing_string;
        }
    }
public static function ensure_end_with($string, $trailing_string)
    {
        if (StringTool :: end_with($string, $trailing_string))
        {
            return $string;
        }
        else
        {
            return $string . $trailing_string;
        }
    }
public static function ensure_end_with ( $ string , $ trailing_string ) { if ( StringTool :: end_with ( $ string , $ trailing_string ) ) { return $ string ; } else { return $ string . $ trailing_string ; } }
Ensure a string ends with another given string

@param $string The string that must end with a trailing string
@param $trailing_string The string to add at the end of the main string if necessary
@return string
Ensure a string ends with another given string