OpenRA.StreamExts.ReadASCIIZ C# (CSharp) Method

ReadASCIIZ() public static method

public static ReadASCIIZ ( this s ) : string
s this
return string
        public static string ReadASCIIZ(this Stream s)
        {
            var bytes = new List<byte>();
            byte b;
            while ((b = s.ReadUInt8()) != 0)
                bytes.Add(b);
            return new string(Encoding.ASCII.GetChars(bytes.ToArray()));
        }