code: public static String combine(String str1, String str2, String separator) {
  
          if (separator == null || separator.isEmpty()) {
              return str1 == null ? str2 : str1.concat(str2);
          }
          if (str1 == null)
              str1 = "";
          if (str2 == null)
              str2 = "";
  
          StringBuilder builder = new StringBuilder();
          if (str1.endsWith(separator)) {
              builder.append(str1.substring(0, str1.length() - separator.length()));
          } else {
              builder.append(str1);
          }
          builder.append(separator);
  
          if (str2.startsWith(separator)) {
              builder.append(str2.substring(separator.length()));
          } else {
              builder.append(str2);
          }
  
          return builder.toString();
      }
docs: e.g. str1= "aaaa/", str2= "/bbb" ,separator="/" will return "aaaa/bbb"
  
  @param str1
  @param str2
  @param separator
  @return