| | |
| | |
|
| | | // �Ƿ��ǿյ��ַ�
|
| | | public static boolean isNullOrEmpty(String text) {
|
| | | if (text == null || text.length() == 0 || text.equalsIgnoreCase("null")) {
|
| | | if (text == null || text.trim().length() == 0 || text.equalsIgnoreCase("null")) {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | |
| | | 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;
|
| | | |
| | | 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;
|
| | | }
|
| | | return null;
|
| | | |
| | | if (str.endsWith(sperator))
|
| | | str = str.substring(0, str.length() - sperator.length());
|
| | | return str;
|
| | | }
|
| | |
|
| | | }
|