Match specific other submitted field string value
(must be both strings, check is type sensitive)

@param   string
@param   string
@return  bool
15946
public function _validation_match_field($val, $field)
	{
		if ($this->input($field) !== $val)
		{
			$validating = $this->active_field();
			throw new \Validation_Error($validating, $val, array('match_field' => array($field)), array($this->field($field)->label));
		}

		return true;
	}
463830
public static function contains($string = false, $substring = false) {

        if ($substring && $substring && strpos($string, $substring) !== false) {

            return true;
        }

        return false;
    }
593875
public function match($string)
    {
        return $this->string === $string || in_array($string, $this->aliases, true);
    }
755114
public static boolean compareString(String string, SoyValue other) {
    // This follows similarly to the Javascript specification, to ensure similar operation
    // over Javascript and Java: http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3
    if (other instanceof StringData || other instanceof SanitizedContent) {
      return string.equals(other.toString());
    }
    if (other instanceof NumberData) {
      try {
        // Parse the string as a number.
        return Double.parseDouble(string) == other.numberValue();
      } catch (NumberFormatException nfe) {
        // Didn't parse as a number.
        return false;
      }
    }
    return false;
  }
34852
public static function stringToBoolean($string)
    {
        $flag = filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);

        if ($flag) {
            return true;
        } elseif (is_null($flag)) {
            return $string;
        }

        return false;
    }
1006851
function (query, string, exact) {
        if (typeof string !== 'string' || string === '') {
          return false;
        }
        if (exact) {
          return string.toLowerCase() === query.toLowerCase();
        }
        return string.toLowerCase().indexOf(query.toLowerCase()) !== -1;
      }
603754
public static Matcher<Object> hasSingleFailureContaining(final String string) {
        return new BaseMatcher<Object>() {
            public boolean matches(Object item) {
                return item.toString().contains(string) && failureCountIs(1).matches(item);
            }

            public void describeTo(Description description) {
                description.appendText("has single failure containing " + string);
            }
        };
    }
386486
public function compare($string)
    {
        foreach ($this->tokens as $token) {
            if (strcasecmp($token, $string) === 0) {
                $this->found = true;
            }
        }
    }
668763
public static function containsValidJSON($string)
	{
		try
		{
			$result = json_decode($string);
		}
		catch(\Exception $e)
		{}
		
		if(self::getJSONError() === NULL)
			return true;
		else
			return false;
	}
286159
public char match(String str1, String str2) {
        if (str1 == null || str2 == null)
            return IMappingElement.IDK;
        if (str1.equals(str2)) {
            return IMappingElement.EQUIVALENCE;
        } else
            return IMappingElement.IDK;
    }
1232715
public boolean isMatched(String value)
    {
        if (value == null)
            return false;
        if ((_match != null)) {
            for (int i = 0; i < _match.length; i++) {
                if (value.equals(_match[i]))
                    return true;
            }
        }
        else {
            if (_defaultSelections != null) {
                return (_defaultSelections.contains(value));
            }
        }

        return false;

    }
427931
public function parseFromString($string){
		$dom = $this->html5->loadHTML($string);
		if( is_a($dom, 'DOMDocument') ){
			return $dom;
		}else{
			return false;
		}
	}
85695
public function contentEquals($string): bool
    {
        try {
            Assert::typeOf(['string', __CLASS__], $string);
        } catch (InvalidArgumentException|TypeError $t) {
            return false;
        }

        return $this->data === (string) $string;
    }
792216
function stringMatch(stringValues) {
	return function(testValue) {
		for (var i = stringValues.length - 1; i >= 0; i--) {
			if (stringValues[i] === testValue) {
				return true;
			}
		}
		return false;
	};
}
286524
public static function hasHtml($string, &$matches = array(), $ifAll = false) {
		return 0 < self::validateByRegExp('/<(.*)>.*|<(.*)\/>/', $string, $matches, $ifAll);
	}
498319
def match(self, string):
        """"""
        if self.casesensitive:
            return fnmatch.fnmatch(string, self.pattern)
        else:
            return fnmatch.fnmatch(string.lower(), self.pattern.lower())
661278
public function equals($string)
    {
        $string = StdObjectWrapper::toString($string);

        // we double-cast the $string param to string, because integer is also a string, but in strcmp function integer
        // can cause unwanted mismatches if it's not strictly casted to string
        $result = strcmp((string)$string, $this->val());
        if ($result !== 0) {
            return false;
        }

        return true;
    }