hyTags
HomeHome DocumentationDocumentation

url-get-port

Gets the port from a URL
Parameter
Type
Description
self
Url
The URL to get the port from
return
number
The port number, or nil if not specified
Test Case:Get port from URL
    <div></div>
    
    <url-from-string string="https://example.com:8080/path">
    <url-get-port>
    <assert-equal value="8080" type="number">
    
    👆 Try to change something!
  • Test succeeded Test failed