@param string $string

@return \BrowscapHelper\Source\Ua\UserAgent
164109
public static function fromString(string $string): self
    {
        $stringHeaders = explode(SourceInterface::DELIMETER_HEADER, $string);
        $headers       = [];

        foreach ($stringHeaders as $value) {
            [$name, $valueRow] = explode(SourceInterface::DELIMETER_HEADER_ROW, $value);

            $headers[$name] = $valueRow;
        }

        return new self($headers);
    }
960205
public function put($string)
    {
        if (!$this->handle) $this->open('a');
        return $this->fs->fwrite($this->handle, $string);
    }
1218908
protected function xmlentities($string) { 
   		return str_replace( array( '&', '"', "'", '<', '>', '’' ), array( '&amp;' , '&quot;', '&apos;' , '&lt;' , '&gt;', '&apos;' ), $string);
	}
452493
public function concat($string)
    {
        $this->source .= $string;
        $this->length = mb_strlen($this->source);
        return $this;
    }
758432
public function sub($string)
    {
        $this->timestamp = $this->getTimestamp() - $this->evaluateDateString($string);

        return $this;
    }
226758
protected function replacePlaceHolder($string)
    {
        foreach ($this->placeHolders as $key => $val) {
            $string = str_replace($key, $val, $string);
        }

        return $string;
    }
1273398
protected function replaceText($string)
    {
        if (empty($string)) {
            $this->node->parentNode->removeChild($this->node);

            return null;
        }

        $newElement = $this->node->ownerDocument->createTextNode($string);

        $newNode = $this->node->ownerDocument->importNode($newElement, true);

        $this->node->parentNode->replaceChild($newNode, $this->node);
        $this->node = $newNode;

        return $this;
    }
1176130
public function parseString($string)
    {
        $tokens = new Stack($this->tokenizer->tokenize($string));

        if ($tokens[0]->type === Tokenizer::T_EOF) {
            return new CTX\AccountInfoList();
        }

        $ctx = new CTX();
        $this->reduceStruct($tokens, $ctx);

        return $ctx->accountInfoList[0];
    }
269134
public function prepend($string)
	{
		ArgumentValidator::validateScalar($string);
		$this->string = (string)$string . $this->string;
		return $this;
	}
989743
public function get($string)
    {
        $lowercase = strtolower($string);

        if (!parent::has($lowercase))
        {
            if (isset($this->_aliases[$lowercase])) {
                $key = $this->_aliases[$lowercase];
            }
            else if(!JFactory::getLanguage()->hasKey($string))
            {
                if (substr($string, 0, strlen($this->getPrefix())) === $this->getPrefix()) {
                    $key = $string;
                } else {
                    //Gets a key from the catalogue and prefixes it
                    $key = $this->getPrefix().$this->generateKey($string);
                }
            }
            else $key = $string;

            $this->set($lowercase, JFactory::getLanguage()->_($key));
        }

        return parent::get($lowercase);
    }
534307
public function apply(string $string) : string
    {
        return preg_replace($this->pattern, $this->replacement, $string);
    }
143568
final protected function auth($string = '') {
    $canonical = strtoupper($this->method) . $this->path() . strval($this->datetime) . $string;
    $signature = $this->hhmac($canonical, $this->api_key_secret);
    return sprintf('HHMAC; key=%s; signature=%s; date=%s',
      $this->api_key_id, $signature,
      $this->datetime
    );
  }
88931
public static function createFromString(string $string)
    {
        $string = trim($string);
        $parts = explode(': ', $string, 2);

        return new Header($parts[0], $parts[1]);
    }
805657
public static function toObject($string = '')
    {

        if ($string === '') {
            return new stdClass();
        }


        if (self::isJson($string)) {
            return json_decode($string);
        }


        if (self::isXml($string)) {
            return self::xmlToObject($string);
        }

        $unserialize = self::unserialize($string);
        if ($unserialize === false) {
            return new stdClass();
        }

        if (\is_object($unserialize)) {
            return $unserialize;
        }

        return new stdClass();
    }
996784
public static function removeDisallowedJavaScriptInLinksOrImgTags($string)
    {
        $string = preg_replace(
            "#<a.+?href=.*?(alert\(|alert&\#40;|javascript\:|window\.|document\.|\.cookie|<script|<xss).*?\>.*?</a>#si",
            "",
            $string
        );
        $string = preg_replace(
            "#<img.+?src=.*?(alert\(|alert&\#40;|javascript\:|window\.|document\.|\.cookie|<script|<xss).*?\>#si",
            "",
            $string
        );

        return preg_replace("#<(script|xss).*?\>#si", "", $string);
    }
668513
public function executeFunction($string)
    {
        preg_match_all('/(.*)\((.*)\)/', $string, $matches);

        if (count($matches) > 0 && is_array($matches[0]) && count($matches[0]) > 0) {
            $function = $matches[1][0];

            return $function($this->removeQuotes($matches[2][0]));
        }

        return Constants::NOT_RESOLVED;
    }
1290841
public function after($string = '')
	{
		$lastUpdated = $this->lastUpdated;

		add_filter('wp_nav_menu_items', function ($items, $args) use ($lastUpdated, $string)
		{
			if ($args->theme_location == $lastUpdated)
			{
				$items .= $string;
			}

			return $items;

		}, 10, 2);

		return $this;
	}