コード例 #1
0
 /**
  * Checks if the string contains the provided needle.
  *
  * @param string|Mol_DataType_String $needle
  * @return boolean True if the string contains the needle, false otherwise.
  */
 public function contains($needle)
 {
     return Mol_Util_String::contains($this->value, $this->toValue($needle));
 }
コード例 #2
0
 /**
  * Checks if contains() searches for digits that are passed as argument.
  *
  * Ensures that integer values are not converted to characters internally.
  */
 public function testContainsSearchesForProvidedDigits()
 {
     $result = Mol_Util_String::contains('123', 2);
     $this->assertTrue($result);
 }