Exemplo n.º 1
0
        /// <summary>
        /// Read text from data, removing 0x00 padding.
        /// </summary>
        /// <param name="index"></param>
        /// <param name="maxLength"></param>
        /// <returns></returns>
        public string GetPaddedUtf8String(int index, int maxLength)
        {
            var bytes = Data.Skip(index).TakeWhile((i, c) => i != 0 && c <= maxLength).ToArray();

            //var reader = new Text.PNAReader(bytes, false, true);

            //return reader.Text;

            return(NameLoader.LoadName(bytes));
        }
Exemplo n.º 2
0
 public string LoadName(byte[] nameData)
 {
     return(NameLoader.LoadName(nameData));
 }