Sample code for 30+ languages & platforms
Swift

Example: Http.GetDomain method

Demonstrates the GetDomain method.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let http = CkoHttp()!

    var domain: String? = http.getDomain(url: "https://chilkatsoft.com/refdoc/csharp.asp")
    print("\(domain!)")

    // Output: chilkatsoft.com

}