Example #1
0
        public string GetString(long count, long offset = 0, bool next = true)
        {
            TesBytes b      = GetBytes(count, offset, next);
            string   result = b.ToString();

            return(result);
        }
Example #2
0
        public TesString(TesBytes value)
        {
            if (value[value.Count() - 1] == 0x00)
            {
                isNullTerminated = true;
            }

            this.Value = value.ToString();
        }
Example #3
0
        public string GetNullTerminatedString(long pos)
        {
            this.pos = pos;
            if (pos != br.BaseStream.Position)
            {
                br.BaseStream.Seek(pos, SeekOrigin.Begin);
            }

            TesBytes bytes = new TesBytes();
            byte     b;

            do
            {
                b = br.ReadByte();
                bytes.Add(b);
                ++pos;
            }while (b != 0x00 && pos < len);

            string result = bytes.ToString();

            return(result);
        }