[FileTools] Get Zip/TZip work done up to this point committed

This commit is contained in:
Matt Nadareski
2016-09-13 21:36:45 -07:00
parent 7a08f8444b
commit 7550b38024
3 changed files with 203 additions and 0 deletions

View File

@@ -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
}
}