mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 08:56:25 +02:00
- Samsung J series: fixed deleting of channels
- LG GlobalClone: modified channel names were not written to the file - LG GlobalClone: ask whether the conflicting xx*.TLL files should be renamed so that the TV can import the GlobalClone file. - LG GlobalClone: improved support for old file format with may have caused errors due to invalid XML characters inside the file. - Panasonic: re-enabled channel lists with gaps in the numbers - Update-Check: looking for latest version at github.com - Detecting corrupted files with 0 size or all bytes with value 0 - upgraded to latest DevExpress version
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ChanSort.Api
|
||||
{
|
||||
@@ -118,5 +119,18 @@ namespace ChanSort.Api
|
||||
return bytes;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region HexEncode()
|
||||
public static string HexEncode(byte[] bytes, bool uppercase = false)
|
||||
{
|
||||
const string HexDigitsLower = "0123456789abcdef";
|
||||
const string HexDigitsUpper = "0123456789ABCDEF";
|
||||
var hexDigits = uppercase ? HexDigitsUpper : HexDigitsLower;
|
||||
var sb = new StringBuilder(bytes.Length * 2);
|
||||
foreach (byte b in bytes)
|
||||
sb.Append(hexDigits[b >> 4]).Append(hexDigits[b & 0x0F]);
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user