AssemblyCSharp.StringUtils.SafeFormat C# (CSharp) Method

SafeFormat() public static method

public static SafeFormat ( string message ) : string
message string
return string
        public static string SafeFormat(string message, params object[] args)
        {
            if (string.IsNullOrEmpty(message))
            {
            return string.Empty;
            }

            string msg;
            try
            {
            msg = args != null && args.Length > 0 ? string.Format(message, args) : message;
            }
            catch
            {
            msg = message;
            }

            return msg;
        }