Avalon.Network.PacketReader.ReadUnicodeString C# (CSharp) Method

ReadUnicodeString() public method

public ReadUnicodeString ( int fixedLength ) : string
fixedLength int
return string
        public string ReadUnicodeString(int fixedLength)
        {
            int bound = m_Index + (fixedLength << 1);
            int end = bound;

            if (bound > m_Size)
                bound = m_Size;

            StringBuilder sb = new StringBuilder();

            int c;

            while ((m_Index + 1) < bound && (c = ((m_Data[m_Index++] << 8) | m_Data[m_Index++])) != 0)
                sb.Append((char)c);

            m_Index = end;

            return sb.ToString();
        }

Same methods

PacketReader::ReadUnicodeString ( ) : string