public static bool RemoveIgnoreCase(List <string> list, string value) { if (list == null) { return(false); } var item = list.FirstOrDefault(x => StringUtils.EqualsIgnoreCase(x, value)); return(list.Remove(item)); }
public static bool IsType(FileType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (StringUtils.EqualsIgnoreCase("." + type.GetValue(), typeStr)) { return(true); } return(false); }
public static bool IsZip(string typeStr) { return(StringUtils.EqualsIgnoreCase(".zip", typeStr)); }
public static bool ContainsIgnoreCase(IEnumerable <string> list, string target) { return(list != null && list.Any(element => StringUtils.EqualsIgnoreCase(element, target))); }
public static object GetValueIgnoreCase(IDictionary <string, object> dict, string key) { var item = dict?.FirstOrDefault(x => StringUtils.EqualsIgnoreCase(x.Key, key)); return(item?.Value); }
public static bool IsTxt(string typeStr) { return(StringUtils.EqualsIgnoreCase(".txt", typeStr)); }