Uri.hasProtocol

bool hasProtocol(string uri, string protocol)

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

Parameters

uria URI string
protocola protocol string (e.g. "http")

Returns

true if the protocol matches.