DailerCode Code that will return the Country Dailer Code out of the Phone number let phoneNumber = "+91963789xxxx" if let countryCode = parseCountryCode(phoneNumber) { print(countryCode) // +91 }