[internal] - also return if string is empty

This commit is contained in:
ivandrofly 2015-09-06 00:45:51 +01:00
parent b33576ae55
commit a1f3caea4c

View File

@ -46,7 +46,7 @@ namespace Nikse.SubtitleEdit.Core
/// <returns>An encoded string.</returns>
public static string EncodeNamed(string source)
{
if (source == null)
if (string.IsNullOrEmpty(source))
return string.Empty;
var encoded = new StringBuilder(source.Length);
@ -327,7 +327,7 @@ namespace Nikse.SubtitleEdit.Core
/// <returns>An encoded string.</returns>
public static string EncodeNumeric(string source)
{
if (source == null)
if (string.IsNullOrEmpty(source))
return string.Empty;
var encoded = new StringBuilder(source.Length);