Пример #1
0
 /**
  * Checks if the string contains any of the provided needles.
  *
  * @param array(string|Mol_DataType_String) $needles
  * @return boolean True if the string contains a needle, false otherwise.
  */
 public function containsAny(array $needles)
 {
     $needles = $this->toValues($needles);
     return Mol_Util_String::containsAny($this->value, $needles);
 }
Пример #2
0
 /**
  * Ensures that containsAny() returns true if an empty list of needles is provided.
  */
 public function testContainsAnyReturnsTrueIfListOfNeedlesIsEmpty()
 {
     $result = Mol_Util_String::containsAny('abc', array());
     $this->assertTrue($result);
 }