mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
[internal] - also return if string is empty
This commit is contained in:
parent
b33576ae55
commit
a1f3caea4c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user