Beispiel #1
0
 /// <summary>
 /// 去除字符串中的重复元素
 /// </summary>
 /// <returns></returns>
 public static string GetUniqueString(string s, string splitStr)
 {
     return(ObjectArrayToString(RemoveRepeaterItem(StringHelper.SplitString(s, splitStr)), splitStr));
 }
Beispiel #2
0
 /// <summary>
 /// 判断字符串是否在字符串中
 /// </summary>
 public static bool IsInArray(string s, string array)
 {
     return(IsInArray(s, StringHelper.SplitString(array, ","), false));
 }
Beispiel #3
0
 /// <summary>
 /// 移除字符串中的指定项
 /// </summary>
 /// <param name="s">源字符串</param>
 /// <returns></returns>
 public static string[] RemoveStringItem(string s)
 {
     return(RemoveArrayItem(StringHelper.SplitString(s), "", true, false));
 }
Beispiel #4
0
 /// <summary>
 /// 判断字符串是否在字符串中
 /// </summary>
 public static bool IsInArray(string s, string array, string splitStr, bool ignoreCase)
 {
     return(IsInArray(s, StringHelper.SplitString(array, splitStr), ignoreCase));
 }