using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace CommonHelper { /// /// 字符串对象扩展方法。 /// public static class ExtString { /// /// 判断字符串是否为空。 /// /// /// public static bool IsNullOrEmpty(this string str) { return string.IsNullOrEmpty(str); } /// /// 字符串分割成字符串数组。 /// /// /// 分隔符,默认为逗号。 /// public static string[] ToStrArray(this string str, string separator = ",") { return str.Split(new string[] { separator }, StringSplitOptions.RemoveEmptyEntries); } } }