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

5 lines
104 B
Ruby

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