/// <summary>
        /// Compares the equality of two StringCharacterIterator objects.
        /// </summary>
        ///
        /// <param name="obj">the StringCharacterIterator object to be compared with.</param>
        /// <returns>true if the given obj is the same as this StringCharacterIterator
        /// object; false otherwise.</returns>
        public override bool Equals(Object obj)
        {
            if ((Object)this == obj)
            {
                return(true);
            }
            if (!(obj  is  StringCharacterIterator))
            {
                return(false);
            }

            StringCharacterIterator that = (StringCharacterIterator)obj;

            if (GetHashCode() != that.GetHashCode())
            {
                return(false);
            }
            if (!text.Equals(that.text))
            {
                return(false);
            }
            if (pos != that.pos || begin != that.begin || end != that.end)
            {
                return(false);
            }
            return(true);
        }
 /// <summary>
 /// Creates a copy of this iterator.
 /// </summary>
 ///
 /// <returns>A copy of this</returns>
 public Object Clone()
 {
     try {
         StringCharacterIterator other = (StringCharacterIterator)base.MemberwiseClone();
         return(other);
     } catch (Exception e) {
         throw new InvalidOperationException();
     }
 }