Assigns the token end delimiter.

@since [*next-version*]

@param Stringable|string|int|float|bool|null $delimiter The delimiter that marks the end of a token.

@throws InvalidArgumentException If the delimiter is invalid.
776750
protected function _setTokenEnd($delimiter)
    {
        if (!is_null($delimiter)) {
            $delimiter = $this->_normalizeTokenDelimiter($delimiter);
        }

        $this->tokenEnd = $delimiter;
    }
354424
public function append($key, $value, $delimiter = ',')
    {
        $newValue = $value;
        if (isset($this->properties[$key]) && !empty($this->properties[$key])) {
            $newValue = $this->properties[$key] . $delimiter . $value;
        }
        $this->properties[$key] = $newValue;
    }
1235249
public function offsetSet($offset, $value)
    {
        if (!$value instanceof Token) {
            throw new \InvalidArgumentException('Value must be of type Token.');
        }

        if ($offset === null) {
            $this->tokens[] = $value;

            return;
        }

        $this->tokens[$offset] = $value;
    }
219986
private function EndToken( $s = null )
	{
		$this->m_length = is_null( $s )
			? $this->getPosition() - $this->m_anchor
			: strlen( $s );
	}
985468
public function _setTokenStart($delimiter)
    {
        if (
            !($delimiter instanceof Stringable) &&
            !is_string($delimiter) &&
            !is_null($delimiter)
        ) {
            throw $this->_createInvalidArgumentException($this->__('Invalid token start delimiter'), null, null, $delimiter);
        }

        $this->tokenStart = $delimiter;
    }
1204099
public function parse($regExp)
    {
        if (!$regExp) {
            throw new \InvalidArgumentException('RegExp is empty');
        }

        $startDelimiter = $regExp[0];
        $delimiterPairs = RegExp::getDelimiterPairs();
        $endDelimiter = isset($delimiterPairs[$startDelimiter])
            ? $delimiterPairs[$startDelimiter]
            : $startDelimiter;
        $endDelimiterPosition = strrpos($regExp, $endDelimiter);
        if (!$endDelimiterPosition) {
            throw new \InvalidArgumentException(sprintf('Closing delimiter %s not found', $startDelimiter));
        }

        return new RegExp(
            $startDelimiter,
            $endDelimiter,
            substr($regExp, 1, $endDelimiterPosition - 1),
            substr($regExp, $endDelimiterPosition + 1)
        );
    }
1084111
protected function _setTokenizer($tokenizer)
    {
        if ($tokenizer !== null && !($tokenizer instanceof TokenizerInterface)) {
            throw $this->_createInvalidArgumentException($this->__('Invalid tokenizer'), null, null, $tokenizer);
        }

        $this->tokenizer = $tokenizer;
    }
472146
public function addWordDelimiter($delimiter)
    {
        if (in_array($delimiter, $this->getWordDelimiters())) {
            throw new \Exception("Word delimiter '$delimiter' is already there.");
        }
        if (empty($delimiter)) {
            throw new \Exception('Word delimiter cannot be null.');
        }
        if (is_array($delimiter)) {
            $this->_wordDelimiters = array_merge($this->getWordDelimiters(), $delimiter);
        } else {
            $this->_wordDelimiters[] = $delimiter;
        }
        return $this;
    }
771938
public static function getVendorPrefixRegExp($delimiter = null)
    {
        $vendorPrefixValues = self::getVendorPrefixValues();
        foreach ($vendorPrefixValues as $vendorPrefixKey => $vendorPrefixValue) {
            $vendorPrefixValues[$vendorPrefixKey] = preg_quote($vendorPrefixValue, $delimiter);
        }
        return implode('|', $vendorPrefixValues);
    }
360424
public function setSeparator($separator)
    {
        if (!in_array(
            $separator,
            [
                ' ',
                '-'
            ],
            true
        )
        ) {
            $separator = ' ';
        }

        $this->separator = $separator;

        return $this;
    }
978026
public function setMargin($margin = 0) {
		$margin = $this->parseSizes($margin);

		foreach ($margin as $side => $value) {
			if (! is_int($value) || $value < 0) {
				throw new InvalidArgumentException(sprintf(
					'Invalid %s margin: "%s". Must be a positive integer value.',
					$side, $value
				));
			}

			$this->margin[$side] = $value;
		}
	}
991093
public function setDivider($divider)
    {
        if (!is_string($divider) && !is_null($divider)) {
            throw new \InvalidArgumentException(
                'Breadcrumbs::setDivider() only accepts strings or NULL, but '
                . (is_object($divider) ? get_class($divider) : gettype($divider))
                . ' given: ' . print_r($divider, true)
            );
        }

        $this->divider = $divider;

        return $this;
    }
957295
private static function isDelim($provider, $delimiter = '=')
    {
        if (mb_strpos($provider, $delimiter) !== false) {

            $res = explode('=', $provider);

            return $res;
        }

        return false;

    }
129961
public function setDelimiter($delimiter)
    {
        if (!is_string($delimiter) || strlen($delimiter) < 1) {
            throw new \InvalidArgumentException("Invalid delimiter specified, must be a string at least 1 character long");
        }

        $this->delimiter = $delimiter;

        return $this;
    }
1274363
public function lastSegment($delimiter) {
        $parts = $this->split($delimiter);
        $returnValue = end($parts);

        return $this->createClone($returnValue);
    }
1115217
protected function _setPathSegmentSeparator($separator)
    {
        if (
            !($separator instanceof Stringable) &&
            !is_string($separator) &&
            !is_null($separator)
        ) {
            throw $this->_createInvalidArgumentException($this->__('Invalid path segment separator'), null, null, $separator);
        }

        $this->pathSegmentSeparator = $separator;
    }
104501
public function load($locale, $delimiter = null)
	{
		if ( ! isset($this->locales[$locale]))
		{
			throw new LocaleNotFoundException("The locale '$locale' was not found in this collection.");
		}

		if ( ! is_null($delimiter))
		{
			$this->locales[$locale]->setDelimiter($delimiter);
		}
		$this->locales[$locale]->flatten();
		$this->activeLocale = $locale;
		return $this;
	}