src/Lib/StringTool.php
public static function ensure_start_with($string, $leading_string)
    {
        if (StringTool :: start_with($string, $leading_string))
        {
            return $string;
        }
        else
        {
            return $leading_string . $string;
        }
    }
public static function ensure_start_with($string, $leading_string)
    {
        if (StringTool :: start_with($string, $leading_string))
        {
            return $string;
        }
        else
        {
            return $leading_string . $string;
        }
    }
public static function ensure_start_with ( $ string , $ leading_string ) { if ( StringTool :: start_with ( $ string , $ leading_string ) ) { return $ string ; } else { return $ leading_string . $ string ; } }
Ensure a string starts with another given string

@param $string The string that must start with a leading string
@param $leading_string The string to add at the beginning of the main string if necessary
@return string
Ensure a string starts with another given string