Asserts that a string starts with a given prefix.

@param string $prefix
@param string $message
@return $this
760584
public function assertStringStartsWith($prefix, $message = '')
    {
        Assert::assertStringStartsWith($prefix, $this->getData(), $message);

        return $this;
    }
369155
public function prefix($prefix)
    {
        $uri = rtrim($prefix, '/').'/'.ltrim($this->uri, '/');

        $this->uri = trim($uri, '/');

        return $this;
    }
38323
public function setTagPrefix($prefix)
    {
        if(!is_string($prefix) && $prefix !== null)
        {
            throw new HTMLTagException("The tag prefix must be a string or null.");
        }

        $this->tag_prefix_previous = $this->getTagPrefix();
        $this->tag_prefix = $prefix;

        return $this;

    }
950054
public function setPathPrefix($prefix)
	{
		$prefix = (string) $prefix;
		if ($prefix === '') {
			$this->pathPrefix = '';

			return;
		}

		$this->pathPrefix = \rtrim($prefix, '\\/') . $this->pathSeparator;
	}
400461
public static function removePrefix($string, $prefix)
    {
        if (self::startsWith($string, $prefix)) {
            return substr($string, mb_strlen($prefix));
        }
        return $string;
    }
840165
public function setCachePrefix($prefix) {
		if (empty($prefix)) {
			$this->prefix = null;
			return;
		}
		
		$prefix = strtolower($prefix);
		
		if (preg_match('/[^0-9a-z_]+/', $prefix)) {
			throw new NoPath('Forbidden symbols used in the prefix');
		}
		
		$this->prefix = $prefix;
	}
1183156
public static function startsWith($string, $prefix, $ignoreCase = false)
    {
        if ($ignoreCase) {
            $string = strtolower($string);
            $prefix = strtolower($prefix);
        }

        return $prefix == substr($string, 0, strlen($prefix));
    }
907596
public function beginNotice(string $message, array $context = []) {
        return $this->begin(LogLevel::NOTICE, $message, $context);
    }
458503
public function prefix($prefix = null)
	{
		if (null !== $prefix)
		{
			$this->prefix = $prefix;
		}
		return $this->prefix;
	}
1294750
protected function setPrefix($prefix)
    {
        if (is_string($prefix)) {
            $this->prefix = $prefix;

            return $this;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($prefix). "' for argument 'prefix' given."
            );
        }
    }
715622
protected function assertFalse($condition, $message = null)
    {
        $this->context->assertFalse($condition, $message);

        return $this;
    }
1276576
public static final Function<String, Boolean> startsWith(final String prefix, final int offset) {
        return new StartsWith(prefix, offset);
    }
742134
public function setPrefix($prefix)
    {
        $this->prefix = $prefix;

        if (!empty($this->prefix)) {
            $this->prefix .= ".";
        }
    }
846939
public function prefix(string $prefix)
    {
        $this->prefix[] = $prefix;
        foreach ((array)$this as $element) {
            if (is_object($element)) {
                $element->prefix($prefix);
            }
        }
        return $this;
    }
850794
public function setMessage($message)
    {
        if ($message === null) {
            $this->message = null;
        } elseif (is_scalar($message) || method_exists($message, '__toString')) {
            $this->message = (string) $message;
        } else {
            throw new InvalidArgumentException('The message must be a string.');
        }

        return $this;
    }
911527
public function prefixKey($prefix)
    {
        if (empty($this->key)) {
            $this->key = $prefix;
        } else {
            $this->key = $prefix . '.' . $this->key;
        }

        return $this;
    }
1142194
public function setMessage($message, $param=null)
    {
        if ($param) {
            $message = sprintf($message, $param);
        }
        $this->message = $message;
        
        return $this;
    }