Created
May 16, 2013 13:55
-
-
Save korzha/5591909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String toPath(String... names) { | |
StringBuilder sb = new StringBuilder(getCharCount(names) + names.length - 1); | |
for (String s : names) { | |
sb.append(s).append(File.separator); | |
} | |
if (sb.length() > 0) { | |
sb.deleteCharAt(sb.length() - 1); | |
} | |
return sb.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment