/// <summary>
        /// Returns a value stating whether the current <see cref="Utf8Span"/> instance contains
        /// the specified <see cref="Rune"/>. The specified comparison is used.
        /// </summary>
        public bool Contains(Rune value, StringComparison comparison)
        {
            // TODO_UTF8STRING: Optimize me to avoid allocations.

#if (!NETSTANDARD2_0 && !NETFRAMEWORK)
            return(this.ToString().Contains(value.ToString(), comparison));
#else
            return(this.ToString().IndexOf(value.ToString(), comparison) >= 0);
#endif
        }
示例#2
0
        /// <summary>
        /// Returns a value stating whether the current <see cref="Utf8Span"/> instance contains
        /// the specified <see cref="Rune"/>. The specified comparison is used.
        /// </summary>
        public bool Contains(Rune value, StringComparison comparison)
        {
            // TODO_UTF8STRING: Optimize me to avoid allocations.

            return(this.ToString().Contains(value.ToString(), comparison));
        }