1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00
Lidarr/NzbDrone.Common/StringExtension.cs
2013-06-11 23:45:41 -07:00

25 lines
No EOL
585 B
C#

using System;
using System.Linq;
namespace NzbDrone.Common
{
public static class StringExtension
{
public static object NullSafe(this object target)
{
if (target != null) return target;
return "[NULL]";
}
public static string NullSafe(this string target)
{
return ((object)target).NullSafe().ToString();
}
public static string FirstCharToUpper(this string input)
{
return input.First().ToString().ToUpper() + String.Join("", input.Skip(1));
}
}
}