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

6 lines
137 B
Ruby

# @param {String} address
# @return {String}
def defang_i_paddr(address)
new_addr = address.gsub(".", "[.]")
return new_addr
end