|
|
@@ -0,0 +1,21 @@
|
|
|
+package com.uas.platform.b2b.core.util;
|
|
|
+
|
|
|
+import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
|
|
|
+/**
|
|
|
+ * 将字符串中的非数字字符去掉
|
|
|
+ * @author af
|
|
|
+ *
|
|
|
+ */
|
|
|
+public class StringUtils {
|
|
|
+ public static String testString(String str){
|
|
|
+ char[] c=new char[str.length()];
|
|
|
+ String str2="";
|
|
|
+ for(int i=0;i<str.length();i++){
|
|
|
+ String tem=""+str.charAt(i);
|
|
|
+ if(tem.matches("[0-9.]")){
|
|
|
+ str2+=tem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return str2;
|
|
|
+ }
|
|
|
+}
|