blob: f969adeda033302d735f11f945d3948a71d9a630 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Tango.Logging
{
/// <summary>
/// Contains <see cref="String"/> extension methods.
/// </summary>
public static class StringExtensions
{
/// <summary>
/// Converts the object to string. If the object is null, will return null.
/// </summary>
/// <param name="obj">The object.</param>
/// <returns></returns>
public static String ToStringSafe(this object obj)
{
return obj != null ? obj.ToString() : String.Empty;
}
}
}
|