| | |
| | | str = str.substring(0, str.length() - sperator.length());
|
| | | return str;
|
| | | }
|
| | | |
| | | public static String concat(Object[] array, String sperator) {
|
| | | if (array == null)
|
| | | return null;
|
| | | |
| | | String str = "";
|
| | | for (int i = 0; i < array.length; i++) {
|
| | | str += array[i] + sperator;
|
| | | }
|
| | | |
| | | if (str.endsWith(sperator))
|
| | | str = str.substring(0, str.length() - sperator.length());
|
| | | return str;
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 淘口令提取
|
| | | * |
| | | * @param str
|
| | | * @return
|
| | | */
|
| | | public static String picUpTaoToken(String str) {
|
| | | String pattern = "(₳{1}[A-Za-z0-9]+₳{1})|(¥{1}[A-Za-z0-9]+¥{1})|(¥{1}[A-Za-z0-9]+¥{1})";
|
| | | Pattern r = Pattern.compile(pattern);
|
| | | Matcher m = r.matcher(str);
|
| | | while (m.find()) {
|
| | | String group = m.group(0);
|
| | | if (!StringUtil.isNullOrEmpty(group))
|
| | | return group;
|
| | | }
|
| | | return null;
|
| | | }
|
| | | }
|