Fails if the string does not contain the given sequence.
546201
public void contains(CharSequence string) {
    checkNotNull(string);
    if (actual() == null) {
      failWithActual("expected a string that contains", string);
    } else if (!actual().contains(string)) {
      failWithActual("expected to contain", string);
    }
  }
1197558
private static boolean isValidSequence(List<ExpandedPair> pairs) {
    for (int[] sequence : FINDER_PATTERN_SEQUENCES) {
      if (pairs.size() > sequence.length) {
        continue;
      }

      boolean stop = true;
      for (int j = 0; j < pairs.size(); j++) {
        if (pairs.get(j).getFinderPattern().getValue() != sequence[j]) {
          stop = false;
          break;
        }
      }

      if (stop) {
        return true;
      }
    }

    return false;
  }
743914
def _check_not_empty(string):
    
    string = string.strip()

    if len(string) == 0:
        message = 'The string should not be empty'
        raise pp.ParseException(message)
477124
def _get_seq_no(self, content_related):
        
        if content_related:
            result = self._sequence * 2 + 1
            self._sequence += 1
            return result
        else:
            return self._sequence * 2
1275284
public static boolean containsAny(final String str, final String[] list, final boolean ignoreCase) {
        
        if(str == null) {
            return false;
        }
        
        if(list == null || list.length == 0) {
            return false;
        }
        
        for(String item : list) {
            if(ignoreCase) {
                if(containsIgnoreCase(str, item)) {
                    return true;
                }
            } else {
                if(str.indexOf(item) >= 0) {
                    return true;
                }
                
            }
        }
        
        return false;
        
    }
877668
public static boolean containsWhitespace(final CharSequence seq) {
        if (isEmpty(seq)) {
            return false;
        }
        final int strLen = seq.length();
        for (int i = 0; i < strLen; i++) {
            if (CharUtils.isWhitespace(seq.charAt(i))) {
                return true;
            }
        }
        return false;
    }
637054
public static Set<String> simpleSequenceToSet(SimpleSequence simpleSequence)
    {
        if (simpleSequence == null)
            return Collections.emptySet();

        Set<String> result = new HashSet<>();
        for (int i = 0; i < simpleSequence.size(); i++)
        {
            try
            {
                Object sequenceEntry = simpleSequence.get(i);
                if (sequenceEntry instanceof SimpleScalar)
                {
                    result.add(((SimpleScalar) sequenceEntry).getAsString());
                }
                else
                {
                    result.add(simpleSequence.get(i).toString());
                }
            }
            catch (Exception e)
            {
                throw new RuntimeException(e);
            }
        }
        return result;
    }
1230907
private static DNASequence getDNASequence(String str) {
		try {
			DNASequence s = new DNASequence(str);
			return s;
		} catch (CompoundNotFoundException e) {

			logger.error("Unexpected error when creating DNASequence ",e);
		}
		return null;
	}
819060
def get_chain_sequence_string(self, chain_id, use_seqres_sequences_if_possible, raise_Exception_if_not_found = True):
        ''''''
        chain_pair = self.get_annotated_chain_sequence_string(chain_id, use_seqres_sequences_if_possible, raise_Exception_if_not_found = raise_Exception_if_not_found)
        if chain_pair:
            return chain_pair[1]
        return None
1007570
def check_allowed_letters(seq, allowed_letters_as_set):
    

    # set of unique letters in sequence
    seq_set = set(seq)

    not_allowed_letters_in_seq = [x for x in seq_set if str(x).upper() not in allowed_letters_as_set]

    if len(not_allowed_letters_in_seq) > 0:
        raise forms.ValidationError(
            "This sequence type cannot contain letters: " + ", ".join(not_allowed_letters_in_seq))
524329
def find_line_containing(strings: Sequence[str], contents: str) -> int:
    
    for i in range(len(strings)):
        if strings[i].find(contents) != -1:
            return i
    return -1
247808
def excluding(self, sequence) -> Generator:
        """"""
        return (element for element in sequence
                if self.indexer(element) not in self.predicates)
608561
public FastqBuilder withSequence(final String sequence)
	{
		if (sequence == null)
		{
			throw new IllegalArgumentException("sequence must not be null");
		}
		if (this.sequence == null)
		{
			this.sequence = new StringBuilder(sequence.length());
		}
		this.sequence.replace(0, this.sequence.length(), sequence);
		return this;
	}
439374
@GwtIncompatible("java.util.regex.Pattern")
  public void doesNotContainMatch(Pattern regex) {
    Matcher matcher = regex.matcher(actual());
    if (matcher.find()) {
      failWithoutActual(
          fact("expected not to contain a match for", regex),
          fact("but contained", matcher.group()),
          fact("full string", actualCustomStringRepresentationForPackageMembersToCall()));
    }
  }
1171769
public Sequence getSequence(String sequenceKey, SequenceConfig sequenceConfig) {
        Sequence sequence = sequences.get(checkNotNull(sequenceKey));
        if (null == sequence) {
            sequence = sequenceDB().openSequence(null, 
                    sequenceDB().getEntry(sequenceKey), firstNonNull(sequenceConfig, defaultSequenceConfig()));
            sequences.put(sequenceKey, sequence);
        }
        
        return sequence;
    }
1244774
def must_contain(self, value, q, strict=False):
        """"""
        if value is not None:
            if value.find(q) != -1:
                return
        self.shout('Value %r does not contain %r', strict, value, q)
1145903
def _validate_sequence_like(
        self, v: Any, values: Dict[str, Any], loc: 'LocType', cls: Optional['ModelOrDc']
    ) -> 'ValidateReturn':
        

        if not sequence_like(v):
            e: errors_.PydanticTypeError
            if self.shape is Shape.LIST:
                e = errors_.ListError()
            elif self.shape is Shape.SET:
                e = errors_.SetError()
            else:
                e = errors_.SequenceError()
            return v, ErrorWrapper(e, loc=loc, config=self.model_config)

        result = []
        errors: List[ErrorList] = []
        for i, v_ in enumerate(v):
            v_loc = *loc, i
            r, ee = self._validate_singleton(v_, values, v_loc, cls)
            if ee:
                errors.append(ee)
            else:
                result.append(r)

        if errors:
            return v, errors

        converted: Union[List[Any], Set[Any], Tuple[Any, ...], Iterator[Any]] = result

        if self.shape is Shape.SET:
            converted = set(result)
        elif self.shape is Shape.SEQUENCE:
            if isinstance(v, tuple):
                converted = tuple(result)
            elif isinstance(v, set):
                converted = set(result)
            elif isinstance(v, Generator):
                converted = iter(result)
        return converted, None