Retrieve Host name from full URL e.g. http://www.host.com?someparam=value and strip prefix

Namespace: MonoSoftware.Web
Assembly: MonoSoftware.Web (in MonoSoftware.Web.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public static string GetHostNameFromURL(
	string urlToParse,
	bool stripPrefix
)
Visual Basic
Public Shared Function GetHostNameFromURL ( 
	urlToParse As String,
	stripPrefix As Boolean
) As String
Visual C++
public:
static String^ GetHostNameFromURL(
	String^ urlToParse, 
	bool stripPrefix
)
F#
static member GetHostNameFromURL : 
        urlToParse : string * 
        stripPrefix : bool -> string 

Parameters

urlToParse
Type: System..::..String
Url to parse
stripPrefix
Type: System..::..Boolean
Strip prefix

Return Value

Type: String
Host name

See Also