Ejemplo n.º 1
0
        /// <summary>
        /// Removes the specified number of characters from the buffer, starting
        /// with the character under the cursor.  The cursor's location is not
        /// affected by this operation.
        /// </summary>
        /// <param name="count">The number of characters to remove.</param>
        /// <returns>True on success; false if the characters could not be
        /// removed.</returns>
        public bool Remove(int count)
        {
            if (CursorIndex + count > _buffer.Length)
            {
                return(false);
            }

            _buffer.Remove(CursorIndex, count);
            return(true);
        }