memcpyimpl() static private method

static private memcpyimpl ( byte src, byte dest, int len ) : void
src byte
dest byte
len int
return void
コード例 #1
0
        public unsafe void AppendString(string stringToAppend)
        {
            if (!string.IsNullOrEmpty(stringToAppend))
            {
                if ((this.m_totalSize - this.m_length) < stringToAppend.Length)
                {
                    throw new IndexOutOfRangeException();
                }

                fixed(char *str = ((char *)stringToAppend))
                {
                    char *chPtr = str;

                    Buffer.memcpyimpl((byte *)chPtr, (byte *)(this.m_buffer + this.m_length), stringToAppend.Length * 2);
                }

                this.m_length += stringToAppend.Length;
            }
        }
コード例 #2
0
        public void AppendString(string stringToAppend)
        {
            if (String.IsNullOrEmpty(stringToAppend))
            {
                return;
            }

            if ((m_totalSize - m_length) < stringToAppend.Length)
            {
                throw new IndexOutOfRangeException();
            }

            fixed(char *pointerToString = stringToAppend)
            {
                Buffer.memcpyimpl((byte *)pointerToString, (byte *)(m_buffer + m_length), stringToAppend.Length * sizeof(char));
            }

            m_length += stringToAppend.Length;
            BCLDebug.Assert(m_length <= m_totalSize, "Buffer has been overflowed!");
        }