1 4 package org.roller.util; 5 6 9 public class StringUtils 10 { 11 public static boolean isEmpty(String str) 12 { 13 if (str == null) return true; 14 return "".equals(str.trim()); 15 } 16 17 public static boolean isNotEmpty(String str) 18 { 19 return !isEmpty(str); 20 } 21 22 public static String [] split(String str1, String str2) 23 { 24 return org.apache.commons.lang.StringUtils.split(str1, str2); 25 } 26 27 public static String replace(String src, String target, String rWith) 28 { 29 return org.apache.commons.lang.StringUtils.replace(src, target, rWith); 30 } 31 32 public static String replace(String src, String target, String rWith, int maxCount) 33 { 34 return org.apache.commons.lang.StringUtils.replace(src, target, rWith, maxCount); 35 } 36 37 public static boolean equals(String str1, String str2) 38 { 39 return org.apache.commons.lang.StringUtils.equals(str1, str2); 40 } 41 42 public static boolean isAlphanumeric(String str) 43 { 44 return org.apache.commons.lang.StringUtils.isAlphanumeric(str); 45 } 46 47 public static String [] stripAll(String [] strs) 48 { 49 return org.apache.commons.lang.StringUtils.stripAll(strs); 50 } 51 52 public static String left(String str, int length) 53 { 54 return org.apache.commons.lang.StringUtils.left(str, length); 55 } 56 } 57 | Popular Tags |