Lines Matching defs:contains
203 assert!(haystack.contains(needle));
247 assert!(!haystack.contains(needle));
257 assert!(!haystack.contains(needle));
267 assert!(haystack.contains(needle));
343 make_test!(contains_bang_str, s, s.contains("!"));
344 make_test!(contains_bang_char, s, s.contains('!'));
2135 b.iter(|| vec.contains(&99))
2942 assert!(l.contains(&3));
2943 assert!(!l.contains(&1));
2947 assert!(!l.contains(&3));
4476 assert!("abcde".contains("bcd"));
4477 assert!("abcde".contains("abcd"));
4478 assert!("abcde".contains("bcde"));
4479 assert!("abcde".contains(""));
4480 assert!("".contains(""));
4481 assert!(!"abcde".contains("def"));
4482 assert!(!"".contains("a"));
4485 assert!(data.contains("ประเ"));
4486 assert!(data.contains("ะเ"));
4487 assert!(data.contains("中华"));
4488 assert!(!data.contains("ไท华"));
4493 assert!("abc".contains('b'));
4494 assert!("a".contains('a'));
4495 assert!(!"abc".contains('d'));
4496 assert!(!"".contains('a'));
4978 assert!(data.contains("bcd"));
4979 assert!(data.contains(&"bcd"));
4980 assert!(data.contains(&"bcd".to_string()));
4998 assert!(s.contains(""));
5001 assert!(s.contains(&s[i..j]));
5009 assert!("bananas".contains("nana"));
5011 // prior to the fix for #16589, x.contains("abcdabcd") returned false
5018 assert!(!"1234567ah012345678901ah".contains("hah"));
5019 assert!(!"00abc01234567890123456789abc".contains("bcabc"));
5129 assert!("* \t".contains(' '));
5130 assert!(!"* \t".contains('?'));
5131 assert!(!"* \t".contains('\u{1F4A9}'));
12293 assert!(v.contains(&3));
12294 assert!(!v.contains(&1));
12298 assert!(!v.contains(&3));
14684 /// Ensures that the buffer contains at least enough space to hold `len +
14763 /// Ensures that the buffer contains at least enough space to hold `len +
15535 /// that the string contains valid UTF-8.
16174 //! This module contains the [`String`] type, the [`ToString`] trait for
16563 /// // The String contains no chars, even though it has capacity for more
16743 /// if `v` contains any invalid data.
16889 /// string contains valid UTF-8.
17655 /// Returns a newly allocated `String`. `self` contains bytes `[0, at)`, and
17656 /// the returned `String` contains bytes `[at, len)`. `at` must be on the
18987 /// Items { values: Cow::Owned(_) } => println!("clone_on_write contains owned data"),
21998 //! Here are some of the things this module contains:
25803 //! This module contains the runtime support for the [`format!`] syntax extension.
27574 /// Returns `true` if the `LinkedList` contains an element equal to the
27588 /// assert_eq!(list.contains(&0), true);
27589 /// assert_eq!(list.contains(&10), false);
27592 pub fn contains(&self, x: &T) -> bool
29819 // - Every non-root node contains at least MIN_LEN elements.
30533 /// Returns `true` if the map contains a value for the specified key.
31984 /// Returns `true` if the map contains no elements.
32215 /// if !books.contains("The Winds of Winter") {
32631 /// Returns `true` if the set contains a value.
32643 /// assert_eq!(set.contains(&1), true);
32644 /// assert_eq!(set.contains(&4), false);
32647 pub fn contains<Q: ?Sized>(&self, value: &Q) -> bool
32705 /// i.e., `other` contains at least all the values in `self`.
32760 if !other.contains(next) {
32781 /// i.e., `self` contains at least all the values in `other`.
33059 /// assert!(a.contains(&1));
33060 /// assert!(a.contains(&2));
33061 /// assert!(a.contains(&3));
33062 /// assert!(a.contains(&4));
33063 /// assert!(a.contains(&5));
33095 /// assert!(a.contains(&1));
33096 /// assert!(a.contains(&2));
33098 /// assert!(b.contains(&3));
33099 /// assert!(b.contains(&17));
33100 /// assert!(b.contains(&41));
33197 /// Returns `true` if the set contains no elements.
33596 if !other_set.contains(&self_next) {
33693 if large_set.contains(&small_next) {
33786 /// If there are no such edges, i.e., if the tree contains no key within
34620 assert!(set.contains(&2));
34621 assert!(set.contains(&4));
34622 assert!(set.contains(&6));
34715 assert!(set.contains(x));
34741 assert!(a.contains(&1));
34742 assert!(a.contains(&2));
34743 assert!(a.contains(&3));
34744 assert!(a.contains(&4));
34753 assert!(a.contains(&1));
34754 assert!(a.contains(&2));
34755 assert!(a.contains(&3));
34756 assert!(a.contains(&4));
34757 assert!(a.contains(&5));
34758 assert!(a.contains(&6));
34941 assert_eq!(a.contains(&1), true);
34942 assert_eq!(a.contains(&2), true);
34943 assert_eq!(a.contains(&3), true);
34944 assert_eq!(a.contains(&4), true);
34945 assert_eq!(a.contains(&5), true);
37687 assert!(keys.contains(&1));
37688 assert!(keys.contains(&2));
37689 assert!(keys.contains(&3));
37699 assert!(values.contains(&'a'));
37700 assert!(values.contains(&'b'));
37701 assert!(values.contains(&'c'));
37873 /// contains a value, that value doesn't occur in the other source (or
37875 /// contains a value, iteration has finished and subsequent calls will
37953 // an edge both identifies a position and contains a pointer to a child node.
38047 /// However, `BoxedNode` contains no information as to which of the two types
38048 /// of nodes it actually contains, and, partially due to this lack of information,
38642 /// Retrieves the node that contains the edge or key-value pair this handle points to.
41608 /// Returns `true` if the `VecDeque` contains an element equal to the
41621 /// assert_eq!(vector.contains(&1), true);
41622 /// assert_eq!(vector.contains(&10), false);
41625 pub fn contains(&self, x: &T) -> bool
41630 a.contains(x) || b.contains(x)
42302 /// Returns a newly allocated `VecDeque`. `self` contains elements `[0, at)`,
42303 /// and the returned `VecDeque` contains elements `[at, len)`.
42543 /// // we can now be sure that `slice` contains all elements of the deque,
44629 /// until it contains at least that many values.
47097 /// visualized as below. The top part is the `Vec` struct, it contains a
47230 /// // The vector contains no items, even though it has capacity for more
47369 /// // The vector contains no items, even though it has capacity for more
48604 /// Returns `true` if the vector contains no elements.
50050 /// The range from `self.vec.len` to `self.tail_start` contains elements