Example #1
0
        public static string String(object a, object b, char separator = ',')
        {
            if (a == null)
            {
                return(String(b));
            }
            if (b == null)
            {
                return(String(a));
            }
            var f = StringPattern.GetFormat(separator);

            return(string.Format(f, a, separator, b));
        }
Example #2
0
        public static string String(string a, string b, char separator = ',')
        {
            if (string.IsNullOrEmpty(a))
            {
                return(String(b));
            }
            if (string.IsNullOrEmpty(b))
            {
                return(String(a));
            }
            var f = StringPattern.GetFormat(separator);

            return(string.Format((string)f, a, separator, b));
        }