BananaMpq.MiscUtils.ConvertToAscii C# (CSharp) Method

ConvertToAscii() public static method

public static ConvertToAscii ( byte pointer, int length ) : string
pointer byte
length int
return string
        public static unsafe string ConvertToAscii(byte* pointer, int length)
        {
            var bytes = new byte[length];
            var actualLength = 0;
            while (*pointer != 0)
                bytes[actualLength++] = *pointer++;
            return Encoding.ASCII.GetString(bytes, 0, actualLength);
        }