AutoIt.Common.TextEncodingDetect.DoesContainNulls C# (CSharp) Method

DoesContainNulls() private static method

Checks if a buffer contains any nulls. Used to check for binary vs text data.
private static DoesContainNulls ( byte buffer, int size ) : bool
buffer byte The byte buffer.
size int The size of the byte buffer.
return bool
        private static bool DoesContainNulls(byte[] buffer, int size)
        {
            uint pos = 0;
            while (pos < size)
            {
                if (buffer[pos++] == 0)
                {
                    return true;
                }
            }

            return false;
        }