MCPcopy Create free account
hub / github.com/0opslab/opslabJutil / join

Method join

src/main/java/com/opslab/helper/StringHelper.java:50–62  ·  view source on GitHub ↗

把string array or list用给定的符号symbol连接成一个字符串 @param array 需要处理的字符串数组 @param symbol 链接的符号 @return 处理后的字符串

(String[] array, String symbol)

Source from the content-addressed store, hash-verified

48 * @return 处理后的字符串
49 */
50 public static String join(String[] array, String symbol) {
51 String result = "";
52 if (array != null) {
53 for (String temp : array) {
54 if (temp != null && temp.trim().length() > 0)
55 result += (temp + symbol);
56 }
57 if (result.length() > 1 && CheckUtil.valid(symbol)) {
58 result = result.substring(0, result.length() - symbol.length());
59 }
60 }
61 return result;
62 }
63
64
65 /**

Callers 1

requestParamsToStringMethod · 0.95

Calls 1

validMethod · 0.95

Tested by

no test coverage detected