duheng
2024-11-29 5c14c9686d2bd7c99fdd6cc6fc19404e6e4b8e4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace HStation.Service
{
    public class KeyWordHelper
    {
        public static List<string> ToList(string keyword)
        {
            if (string.IsNullOrEmpty(keyword))
            {
                return new List<string>();
            }
 
            return keyword.Split(new string[1] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        }
 
        public static string ToString(List<string> KeyWord)
        {
            if (KeyWord == null || KeyWord.Count < 1)
            {
                return string.Empty;
            }
 
            return string.Join(",", KeyWord);
        }
    }
}