@Test public void testgetHideEmailPrefix() { String str1 = "test@163.com"; System.out.println(StringUtil.getHideEmailPrefix(str1)); }
public static String getHideEmailPrefix(String email) { if (null != email) { int index = email.lastIndexOf('@'); if (index > 0) { email = repeat("*", index).concat(email.substring(index)); } } return email; }
StringUtil { public static String getHideEmailPrefix(String email) { if (null != email) { int index = email.lastIndexOf('@'); if (index > 0) { email = repeat("*", index).concat(email.substring(index)); } } return email; } }
StringUtil { public static String getHideEmailPrefix(String email) { if (null != email) { int index = email.lastIndexOf('@'); if (index > 0) { email = repeat("*", index).concat(email.substring(index)); } } return email; }  }
StringUtil { public static String getHideEmailPrefix(String email) { if (null != email) { int index = email.lastIndexOf('@'); if (index > 0) { email = repeat("*", index).concat(email.substring(index)); } } return email; }  static boolean isEmpty(String str); static String joinString(List list, String symbol); static boolean requals(String str1, String str2); static boolean requals(String str1, String str2, String split); static String subStringOmit(String subject, int size); static String subStringSymbol(String str, int len, String symbol); static String joinString(String[] array, String symbol); static String join(String linkStr, String... strs); static String getHideEmailPrefix(String email); static String repeat(String src, int num); static String ltrim(String str1, int num); static String rtrim(String str, int num); static List<String> parseString2List(String src, String pattern); static String formatDouble(double f, String format); static String left(String input, int count); static String right(String input, int count); static String full2Half(String str); static String Half2Full(String str); static String replaceBlank(String str); static boolean isIn(String substring, String[] source); static String string2Unicode(String string); static String unicode2String(String unicode); static String trimPunct(String str); static double SimilarityRatio(String str1, String str2); static double SimilarDegree(String str1, String str2); static int countSubStr(String string, String str); static String replaceFirst(String s, String sub, String with); static String replaceLast(String s, String sub, String with); static String remove(String s, String sub); static String upperFirstChar(String str); static String lowerFirstChar(String str); static boolean rigthEquals(String str1, String str2, int length); static boolean leftEquals(String str1, String str2, int length); }
StringUtil { public static String getHideEmailPrefix(String email) { if (null != email) { int index = email.lastIndexOf('@'); if (index > 0) { email = repeat("*", index).concat(email.substring(index)); } } return email; }  static boolean isEmpty(String str); static String joinString(List list, String symbol); static boolean requals(String str1, String str2); static boolean requals(String str1, String str2, String split); static String subStringOmit(String subject, int size); static String subStringSymbol(String str, int len, String symbol); static String joinString(String[] array, String symbol); static String join(String linkStr, String... strs); static String getHideEmailPrefix(String email); static String repeat(String src, int num); static String ltrim(String str1, int num); static String rtrim(String str, int num); static List<String> parseString2List(String src, String pattern); static String formatDouble(double f, String format); static String left(String input, int count); static String right(String input, int count); static String full2Half(String str); static String Half2Full(String str); static String replaceBlank(String str); static boolean isIn(String substring, String[] source); static String string2Unicode(String string); static String unicode2String(String unicode); static String trimPunct(String str); static double SimilarityRatio(String str1, String str2); static double SimilarDegree(String str1, String str2); static int countSubStr(String string, String str); static String replaceFirst(String s, String sub, String with); static String replaceLast(String s, String sub, String with); static String remove(String s, String sub); static String upperFirstChar(String str); static String lowerFirstChar(String str); static boolean rigthEquals(String str1, String str2, int length); static boolean leftEquals(String str1, String str2, int length);  }