A string does not contain a substring. Returns original string.

@return mixed
@throws DidNotMatchException
@syntax string ?:string does not contain ?:string
967164
public function doesNotContainString()
    {
        if (strpos($this->data[0], $this->data[1]) !== false) {
            throw new DidNotMatchException();
        }

        return $this->data[0];
    }
463830
public static function contains($string = false, $substring = false) {

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

            return true;
        }

        return false;
    }
595702
public function isBase64()
    {
        // An empty string is by definition not encoded.
        if ($this->getLength() === 0) return false;

        // Grab the current string value.
        $possiblyEncoded = $this->scalarString;

        // Attempt to decode it.
        $decoded = base64_decode($possiblyEncoded, true);

        // If we get false it can't be base64
        if ($decoded === false) return false;

        // Lets double check
        return (base64_encode($decoded) === $this->scalarString);
    }
584138
public function getCharset() {
		if (!isset($this->charset)) {
			$numOfMatches = preg_match('/charset\s*=([^;]*)/', $this->getHeader('Content-Type'), $matches);
			if ($numOfMatches) {
				$this->charset = trim($matches[1]);
			} else {
				$this->charset = '';
			}
		}
		return $this->charset;
	}
963900
public function tokenize($string)
    {
        $line     = 1;
        $position = 1;
        $tokens   = array();

        while (strlen($string)) {
            foreach ($this->expressions as $rule) {
                if (!preg_match($rule['match'], $string, $match)) {
                    continue;
                }

                // Remove matched string from input
                $string = substr($string, strlen($match[0]));

                // Update position in file
                $line += substr_count($match[0], "\n");
                if (($pos = strrpos($match[0], "\n")) !== false) {
                    $position  = strrpos($match[0], "\n") + 1;
                } else {
                    $position += strlen($match[0]);
                }

                // Skip irrelevant rules
                if (in_array($rule['type'], $this->ignoreTokens)) {
                    continue 2;
                }

                // Add all other rules including their match to the token array
                $match = $this->removeNumericKeys($match);
                $tokens[] = new Token($rule['type'], $line, $position, $match);
                continue 2;
            }

            throw new \RuntimeException(
                "Could not parse string: '" . substr($string, 0, 20) . "' in line $line at position $position."
            );
        }

        $tokens[] = new Token(self::T_EOF, $line, $position, null);
        return $tokens;
    }
112941
public function getCurrentLine() {
        // Check the string isn't empty
        if ($this->EOF) {
            // Add one to $this->char because we want the number for the next
            // byte to be processed.
            return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1;
        } else {
            // If the string is empty, we are on the first line (sorta).
            return 1;
        }
    }
1181422
public function readStringLen()
    {
        $l = $this->readIntLen();
        if ($l === null) {
            return $l;
        }

        return $this->read($l);
    }
1176034
function _substr($string, $start, $length = null) {
        static $mbstring;

        // Cache expensive function_exists() calls.
        if (!isset($mbstring)) {
            $mbstring = function_exists('mb_substr');
        }

        if (is_null($length)) {
            $length = $this->_strlen($string);
        }
        if ($mbstring) {
            $ret = @mb_substr($string, $start, $length, $this->_charset);
            if (!empty($ret)) {
                return $ret;
            }
        }
        return substr($string, $start, $length);
    }
778336
public function string()
    {
        if (!is_string($this->value)) {
            throw new InvalidStringException($this->name, $this->value);
        }

        return $this;
    }
450214
public static function firstMatchOrLength($string, $toMatch)
    {
        $firstMatch = strpos($string, $toMatch);

        return ($firstMatch === false) ? strlen($string) : $firstMatch;
    }
809358
function substr($str,$start,$len=0) {
		if ($start<0)
			$start=$this->strlen($str)+$start;
		if (!$len)
			$len=$this->strlen($str)-$start;
		return preg_match('/^.{'.$start.'}(.{0,'.$len.'})/us',$str,$match)?
			$match[1]:FALSE;
	}
387849
public function getEscapedString()
    {
        if ($this->escapedString === null) {
            $this->escapedString = str_replace('-', ' ', $this->escape($this->getRawString()));
            $this->escapedString = preg_replace(['/\s+([0-9])/','/\s+/'], ['$1', ' '], $this->escapedString);
        }
        return $this->escapedString;
    }
8538
public function parseEncodedString()
    {
        $l = $this->parseEncodedBinary();
        if (($l === null) || ($l === false)) {
            return $l;
        }
        return $this->read($l);
    }
1331950
protected function scanPyStringContent()
    {
        if (!$this->inPyString) {
            return null;
        }

        $token = $this->scanText();
        // swallow trailing spaces
        $token['value'] = preg_replace('/^\s{0,' . $this->pyStringSwallow . '}/u', '', $token['value']);

        return $token;
    }
675035
public function likeExpression()
    {
        $stringExpr = $this->identificationVariable();
        $not = false;

        if ($this->lexer->isNextToken(Lexer::T_NOT)) {
            $this->match(Lexer::T_NOT);
            $not = true;
        }

        $this->match(Lexer::T_LIKE);

        $stringPattern = $this->stringExpression();

        $likeExpr = new LikeExpressionNode($stringExpr, $stringPattern);
        $likeExpr->setNot($not);

        return $likeExpr;
    }
859397
private static function getRegex()
    {
        if (self::$regex === null) {
            self::$regex = '/('.str_replace('.', '\\.', implode('|', array_keys(self::$suffixes))).')$/';
        }

        return self::$regex;
    }
501237
private function parseNameValue(){

		$index = $this->pos;
		$this->save();


		//$match = $this->MatchReg('/\\G([a-zA-Z\-]+)\s*:\s*((?:\'")?[a-zA-Z0-9\-% \.,!]+?(?:\'")?)\s*([;}])/');
		$match = $this->MatchReg('/\\G([a-zA-Z\-]+)\s*:\s*([\'"]?[#a-zA-Z0-9\-%\.,]+?[\'"]?) *(! *important)?\s*([;}])/');
		if( $match ){

			if( $match[4] == '}' ){
				$this->pos = $index + strlen($match[0])-1;
			}

			if( $match[3] ){
				$match[2] .= ' !important';
			}

			return $this->NewObj4('Less_Tree_NameValue',array( $match[1], $match[2], $index, $this->env->currentFileInfo));
		}

		$this->restore();
	}