Remove a prefix string from the beginning of a string

@param string $prefix

@return StdString
13602
function stripPrefix($prefix)
    {
        $key = (string) $this;

        if (substr($key, 0, strlen($prefix)) == $prefix)
            $key = substr($key, strlen($prefix));

        return new self($key);
    }
341868
public function restorePrefix()
    {
        foreach ($this->removals as $i => $removal) {
            if ($removal->getAffixType() == 'DP') {
                // return the word before precoding (the subject of first prefix removal)
                $this->setCurrentWord($removal->getSubject());
                break;
            }
        }

        foreach ($this->removals as $i => $removal) {
            if ($removal->getAffixType() == 'DP') {
                unset($this->removals[$i]);
            }
        }
    }
55868
protected function replaceToken($string, $prefix = '')
    {
        return preg_replace_callback(
            '/%:(\w.*):%/U',
            function (array $matches) use ($prefix) {
                return sprintf('%s"%s"', $prefix, addcslashes($matches[1], '"\\'));
            },
            $string
        );
    }
557170
public function getHex($prefix = '')
    {
        return sprintf('%s%02x%02x%02x', $prefix,
            $this->getRedValue(),
            $this->getGreenValue(),
            $this->getBlueValue()
        );
    }
1021739
protected function removePrefix($string, $prefix)
    {
        if (substr($string, 0, strlen($prefix)) == $prefix) {
            return substr($string, strlen($prefix));
        } else {
            return $string;
        }
    }
1163964
public function replacePrefixWithUri($prefixedString, $prefixes)
    {
        // check for qname. a qname was given if a : was found, but no < and >
        if (false !== strpos($prefixedString, ':') &&
            false === strpos($prefixedString, '<') && false === strpos($prefixedString, '>')) {
            // prefix is the part before the :
            $prefix = substr($prefixedString, 0, strpos($prefixedString, ':'));

            // if a prefix
            if (true === isset($prefixes[$prefix])) {
                $prefixedString = str_replace($prefix.':', $prefixes[$prefix], $prefixedString);
            }
        }

        return $prefixedString;
    }
1235060
public function getNamespaceForPrefix( $prefix )
	{
		if ( ! isset( $this->instance_namespaces[ $prefix ] ) ) return null;
		return $this->instance_namespaces[ $prefix ];
	}
1090027
public function removePrefixPath($prefix, $path = null)
    {
        $prefix = $this->_formatPrefix($prefix);
        if ($this->_useStaticRegistry) {
            $registry =& self::$_staticPrefixToPaths[$this->_useStaticRegistry];
        } else {
            $registry =& $this->_prefixToPaths;
        }

        if (!isset($registry[$prefix])) {

            throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' was not found in the PluginLoader.');
        }

        if ($path != null) {
            $pos = array_search($path, $registry[$prefix]);
            if (false === $pos) {

                throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' / Path ' . $path . ' was not found in the PluginLoader.');
            }
            unset($registry[$prefix][$pos]);
        } else {
            unset($registry[$prefix]);
        }

        return $this;
    }
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."
            );
        }
    }
333853
public function withTablePrefix(string $prefix): self
    {
        return new static($this->connection, $this->grammar, new TablePrefixer($prefix));
    }
846939
public function prefix(string $prefix)
    {
        $this->prefix[] = $prefix;
        foreach ((array)$this as $element) {
            if (is_object($element)) {
                $element->prefix($prefix);
            }
        }
        return $this;
    }
1112982
public function prepend($prefix): Utility
    {
        return new static(new static($prefix, $this->encoding) . $this->string, $this->encoding);
    }
1106696
protected static function stripPrefix(string $string, string $prefix): string {
        if(strpos($string, $prefix) !== 0) {
            return $string;
        }
        return substr($string, strlen($prefix));
    }
1279007
public static function removePrefixes($string, array $prefixes)
    {
        return array_reduce($prefixes, function ($string, $prefix) {
            return Strings::removePrefix($string, $prefix);
        }, $string);
    }
1351801
public final function removePrefix(string $prefix): LoaderInterface
    {
        $parsedPrefix = $this->parsePrefix($prefix);
        if (array_key_exists($parsedPrefix, $this->prefix)) {
            unset($this->prefix[$parsedPrefix]);
        }
        return $this;
    }
901718
public function titlize($prefix = '-') 
    {
        //argument 1 must be a string
        Eden_String_Argument::i()->test(1, 'string');

        $this->data = ucwords(str_replace($prefix, ' ', $this->data));

        return $this;
    }
12260
public function setPrefixUri($prefix)
	{
		//$prefix =  $this->normalizeUri($prefix);

		if (empty($prefix))
		{
			return $this;
		}

		$this->uri = $prefix .'/'. $this->uri;

		return $this;
	}