BlogML.BlogMLWriterBase.SgmlUtil.IsRootUrlOf C# (CSharp) Method

IsRootUrlOf() public static method

public static IsRootUrlOf ( string rootUrl, string url ) : bool
rootUrl string
url string
return bool
            public static bool IsRootUrlOf(string rootUrl, string url)
            {
                if (rootUrl == null)
                {
                    throw new ArgumentNullException("rootUrl");
                }

                if (url == null)
                {
                    throw new ArgumentNullException("url");
                }

                rootUrl = rootUrl.Trim().ToLower();
                url = url.Trim().ToLower();
                // is it a full path
                if (url.StartsWith("http://"))
                    return url.StartsWith(rootUrl);

                // it's local
                return true;
            }