Uri.hasProtocol

Checks if the protocol of a given valid URI matches @protocol.

class Uri
static
bool
hasProtocol
(
string uri
,
string protocol
)

Parameters

uri string

a URI string

protocol string

a protocol string (e.g. "http")

Return Value

Type: bool

%TRUE if the protocol matches.

Meta