Indicates whether a String is of a specific Character Class.
@access		public
@param		string		$value		String to be checked
@param		string		$class		Key of Character Class
@return		bool
179566
public function isClass( $value, $class )
	{
		$method	= "is".ucFirst( $class );
		if( !method_exists( $this->validator, $method ) )
			throw new BadMethodCallException( 'Predicate "'.$method.'" is not defined.' );
		return $this->validator->$method( $value, $method );
	}
1273683
private function hasColon($value)
    {
        $colons = [':', '%3A', '%3a'];
        foreach ($colons as $colon) {
            if (false !== strpos($value, $colon)) {
                return true;
            }
        }

        return false;
    }
186143
public function isValueValid($value) {
		return $value instanceof Type\AlignmentObjectType || $value instanceof Type\CourseType || $value instanceof DataType\TextType;
	}
728948
public function isValid($value)
    {
        if (!is_string($value)
            && !($value instanceof Uuid) // If instance of Uuid still does not means that is valid
        ) {
            $this->error(self::INVALID);
            return false;
        }

        $this->setValue($value);

        if (!preg_match('/^' . self::UUID_V4_PATTERN . '$/', $value)) {
            $this->error(self::NOT_UUID_V4);
            return false;
        }

        return true;
    }
771086
public function string($value)
    {
        if ($this->notBeEmpty($value)) {
            if (is_string($value) && preg_match('/[A-Za-z]+/i', $value)) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
856657
function isError($value)
	{
		if (!is_object($value)) return false;
		$class = strtolower(get_class($value));
		return $class == 'pear_error' || is_subclass_of($value, 'pear_error') ||
				$class == 'db_error' || is_subclass_of($value, 'db_error');
	}
929854
protected function getModelClassFromValue($value)
    {
        if (empty($value)) return null;

        $parts = explode(static::CLASS_AND_KEY_SEPARATOR, $value, 2);

        return $parts[0];
    }
832869
public static function isString($value)
    {
        if (is_object($value) && method_exists($value, '__toString')) {
            return true;
        }

        if (is_null($value)) {
            return true;
        }

        return is_scalar($value);
    }
1029931
public function checkValue(&$value)
    {
        if (parent::checkValue($value)) {
            $value = trim($value, " \r\n\t\f;");

            // Check if declaration contains "!important"
            if (strpos($value, "!") !== false) {
                $charset = $this->getStyleSheet()->getCharset();
                if (mb_strtolower(mb_substr($value, -10, null, $charset), $charset) === "!important") {
                    $this->setIsImportant(true);
                    $value = rtrim(mb_substr($value, 0, -10, $charset));
                }
            }

            // Optimize the value
            $value = Optimizer::optimizeDeclarationValue($value);

            return true;
        }

        return false;
    }
931253
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $this->_setValue($value);
        if (!ctype_xdigit((string) $value)) {
            $this->_error(self::NOT_HEX);
            return false;
        }

        return true;
    }
1222038
private function filter(string $class): bool
    {
        foreach ($this->patterns as $pattern) {
            if (preg_match($pattern, $class) === 1) {
                return false;
            }
        }

        return true;
    }
531879
def isstring(value):
    """"""
    classes = (str, bytes) if pyutils.PY3 else basestring  # noqa: F821
    return isinstance(value, classes)
44616
private function check($value) {

		if(true === is_string($value)) {
			return false === in_array(preg_match('/^(((?=.*(::))(?!.*\3.+\3))\3?|([\dA-F]{1,4}(\3|:\b|$)|\2))(?4){5}((?4){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})\z/i', $value), [false, 0]);
		}

		return false;
	}
72094
public function isValid($value)
    {
        if (false === Core::get()->classExists($value)) {
            $errorMessage = $this->translateErrorMessage(
                'validator.class_exists.not_valid',
                'configuration_object',
                [$value]
            );

            $this->addError($errorMessage, self::ERROR_CODE_CLASS_NOT_FOUND);
        } elseif (false === in_array($this->options['class'], class_parents($value))) {
            $errorMessage = $this->translateErrorMessage(
                'validator.class_extends_class.not_valid',
                'configuration_object',
                [$value, $this->options['class']]
            );

            $this->addError($errorMessage, self::ERROR_CODE_CLASS_NOT_VALID);
        }
    }
16125
protected function checkClass($value, array $types): ?string
    {
        if (!is_object($value)) {
            return null;
        }

        foreach ($types as $type) {
            if (class_exists($type) && is_a($value, $type)) {
                return $type;
            }
        }

        return null;
    }
1161490
public static function IS_TEXT($value = null)
    {
        $value = self::flattenSingleValue($value);

        return (is_string($value) && !self::IS_ERROR($value));
    }
272687
public static function isClass($string)
    {
        if (is_string($string) === true) {
            $pattern = "/^(?:[^\s]+?(?:\x20){0,})+$/";
    
            return preg_match($pattern, $string) === 1;
        } else {
            
            return false;
        }
    }