public override string GetString(byte[] data, int offset, int length) => Util.TrimFromZero(Encoding.BigEndianUnicode.GetString(data, offset, length));
Beispiel #2
0
 /// <summary>Converts Generation 7 encoded data to decoded string.</summary>
 /// <param name="data">Encoded data</param>
 /// <param name="offset">Offset to read from</param>
 /// <param name="count">Length of data to read.</param>
 /// <returns>Decoded string.</returns>
 public static string GetString7(byte[] data, int offset, int count)
 {
     return(ConvertBin2StringG7_zh(SanitizeString(Util.TrimFromZero(Encoding.Unicode.GetString(data, offset, count)))));
 }
Beispiel #3
0
 /// <summary>Converts Big Endian encoded data to decoded string.</summary>
 /// <param name="data">Encoded data</param>
 /// <param name="offset">Offset to read from</param>
 /// <param name="count">Length of data to read.</param>
 /// <returns>Decoded string.</returns>
 public static string GetBEString3(byte[] data, int offset, int count)
 {
     return(Util.TrimFromZero(Encoding.BigEndianUnicode.GetString(data, offset, count)));
 }
Beispiel #4
0
 public override string getBoxName(int box)
 {
     if (PCLayout < 0)
         return "B" + (box + 1);
     return Util.TrimFromZero(Encoding.Unicode.GetString(Data, PCLayout + 0x22*box, 0x22));
 }