using System;
using System.Collections.Generic;
using System.Text;

namespace Performance.Infrastructure
{
    public static partial class UtilExtensions
    {
        public static string RemoveLineBreak(this string text)
        {
            return text.Replace("\n", "");
        }

        public static string RemoveEnter(this string text)
        {
            return text.Replace("\r", "");
        }

        /// <summary>
        /// 分隔 移除空项
        /// </summary>
        /// <param name="text"></param>
        /// <param name="separator"></param>
        /// <returns></returns>
        public static string[] SplitRemoveEmpty(this string text, params string[] separator)
        {
            return text.Split(separator, StringSplitOptions.RemoveEmptyEntries);
        }
    }
}
