| | |
| | | |
| | | import com.lf.server.entity.all.StaticData; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.regex.Matcher; |
| | |
| | | /** |
| | | * 首字母大写 |
| | | */ |
| | | public static String capitalize(String str) { |
| | | return String.valueOf(str.charAt(0)).toUpperCase() + str.substring(1); |
| | | public static String firstCharToUpperCase(String str) { |
| | | return str.substring(0, 1).toUpperCase() + str.substring(1); |
| | | } |
| | | |
| | | /** |
| | | * 首字母小写 |
| | | */ |
| | | public static String firstCharToLowerCase(String str) { |
| | | return str.substring(0, 1).toLowerCase() + str.substring(1); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static boolean checkPwdValid(String pwd) { |
| | | return Pattern.matches(StaticData.PWD_REG, pwd); |
| | | } |
| | | |
| | | /** |
| | | * 获取日期格式化4:yyyyMMdd_HHmm |
| | | */ |
| | | public static String getDateFormat4() { |
| | | return YMD_HM_FORMAT.format(new Date()); |
| | | } |
| | | } |