using System.Text;

namespace PlcSiemens.Core.Extension
{
    public static class StringBuilderExtension
    {
        /// <summary>追加分隔符字符串，忽略开头，常用于拼接</summary>
        public static StringBuilder Separate(this StringBuilder sb, string separator)
        {
            if (sb == null || separator.IsNullOrEmpty()) return sb;

            if (sb.Length > 0) sb.Append(separator);

            return sb;
        }
    }
}
