mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[FileTools] Get Zip/TZip work done up to this point committed
This commit is contained in:
@@ -525,6 +525,27 @@ namespace SabreTools.Helper
|
||||
return s;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// http://stackoverflow.com/questions/5613279/c-sharp-hex-to-ascii
|
||||
/// </summary>
|
||||
public static string ConvertHex(String hexString)
|
||||
{
|
||||
if (hexString.Contains("-"))
|
||||
{
|
||||
hexString = hexString.Replace("-", "");
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < hexString.Length; i += 2)
|
||||
{
|
||||
String hs = hexString.Substring(i, 2);
|
||||
sb.Append(Convert.ToChar(Convert.ToUInt32(hs, 16)));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user