Here you can find the source of concatPathsStrings(String head, String tail)
public static String concatPathsStrings(String head, String tail)
//package com.java2s; //License from project: Open Source License public class Main { public static String concatPathsStrings(String head, String tail) { String result = null;/* www . j a v a 2s. co m*/ if (head.endsWith("/")) { if (tail.startsWith("/")) { result = head + tail.substring(1, tail.length()); } else { result = head + tail; } } else { if (tail.startsWith("/")) { result = head + tail; } else { result = head + "/" + tail; } } return result; } }