Mwnci splithostport() Function

Syntax

splithostport(string)

Description

The splithostport() function splits a network address of the form “host:port”, “host%zone:port”, “[host]:port” or “[host%zone]:port” into an array containing host or host%zone and port.

Example

println(splithostport("127.0.0.1:80"))
println(splithostport("[::1]:443"))


["127.0.0.1", "80"]
["::1", "443"]