<awangdev>1108. Defanging an IP Address_1.java
public String defangIPaddr(String address) {
        StringBuffer sb = new StringBuffer();
        for (char c : address.toCharArray()) {
            if (c == '.') {
                sb.append("[.]");
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }
public String var_0 ( String var_2 ) {
  StringBuffer var_4 = new StringBuffer ( ) ;
  for ( char var_6 : var_2 . toCharArray ( ) ) {
    if ( var_6 == '.' ) {
      var_4 . append ( "[.]" ) ;
    }
    else {
      var_4 . append ( var_6 ) ;
    }
  }
  return var_4 . toString ( ) ;
}
