my-solutions/problems/1108-defanging-an-ip-address/main.rb

7 lines
137 B
Ruby
Raw Normal View History

2022-11-25 23:43:40 +05:00
# @param {String} address
# @return {String}
def defang_i_paddr(address)
new_addr = address.gsub(".", "[.]")
return new_addr
end