Skip to main content
Extracts the host section from a URL. This function is supported from v3.3 onwards.

Syntax

Parameters

  • str: the string to extract its host string. If str is not a string, this function will try implicit cast first.

Return value

Returns the host string.

Examples