У меня есть две переменные:
site1 = "www.somesite.com";  
site2 = "www.somesite.com/";  
Я хочу сделать что-то вроде этого
function someFunction(site)
{
    // If the var has a trailing slash (like site2), 
    // remove it and return the site without the trailing slash
    return no_trailing_slash_url;
}
Как это сделать?
