Created
February 20, 2020 15:56
-
-
Save bugrym/122eb682c89455a262dadaf5978546cf to your computer and use it in GitHub Desktop.
1108. Defanging an IP Address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func defangIPaddr(_ address: String) -> String { | |
return address.replacingOccurrences(of: ".", with: "[.]") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment