Remove.

@param string $list
@param string $item
@param string $separator
@param string $tag Default ''.
@return string
433520
public static function remove(string $list, string $item, string $separator, string $tag = ''): string
    {
        $items = self::explode($separator, $list);
        $pos = self::pos($list, $item, $separator, $tag);
        if ($pos > -1 && isset($items[$pos])) {
            unset($items[$pos]);
        }
        return implode($separator, $items);
    }
4137
public static function removeIndex(string $list, $index, string $separator): string
    {
        $items = self::explode($separator, $list);
        if (isset($items[$index])) {
            unset($items[$index]);
        }
        return implode($separator, $items);
    }
836391
protected function closeList(array $list, $textBoundary)
	{
		$this->parser->addEndTag('LIST', $textBoundary, 0)->pairWith($list['listTag']);
		$this->parser->addEndTag('LI',   $textBoundary, 0)->pairWith($list['itemTag']);

		if ($list['tight'])
		{
			foreach ($list['itemTags'] as $itemTag)
			{
				$itemTag->removeFlags(Rules::RULE_CREATE_PARAGRAPHS);
			}
		}
	}
1238379
public function removeStyle(Item $item)
    {
        $item->setIntro(preg_replace('/(<[^>]+) style=".*?"/i', '$1', $item->getIntro()));
        $item->setContent(preg_replace('/(<[^>]+) style=".*?"/i', '$1', $item->getContent()));

        return $item;
    }
1039853
public function removeItem($item) {
    if (is_int($item)) {
      $index = $item;
      if ($index < 0) {
        throw new \OutOfBoundsException('index out of bounds');
      }
      $items = $this->getItems();
      if ($index >= count($items)) {
        throw new \OutOfBoundsException('index out of bounds');
      }
      $item = $items[$index];
      $is_last = $index === count($items) - 1;
    }
    else {
      if ($item->parent() !== $this) {
        throw new \InvalidArgumentException('invalid item');
      }
      $items = $this->getItems();
      $last_index = count($items) - 1;
      $last_item = $items[$last_index];
      $is_last = $last_item === $item;
    }
    if (count($items) === 1) {
      // No separators to remove.
    }
    elseif ($is_last) {
      $item->previousUntil(function ($node) {
        if ($node instanceof HiddenNode) {
          return FALSE;
        }
        if ($node instanceof TokenNode && $node->getType() === ',') {
          return FALSE;
        }
        return TRUE;
      })->remove();
    }
    else {
      $item->nextUntil(function ($node) {
        if ($node instanceof HiddenNode) {
          return FALSE;
        }
        if ($node instanceof TokenNode && $node->getType() === ',') {
          return FALSE;
        }
        return TRUE;
      })->remove();
    }
    $item->remove();
    return $this;
  }
735498
public function removeItem(Item $item)
    {
        if ($this->items->contains($item)) {
            $this->items->removeElement($item);
            $item->removeGenre($this);
        }

        return $this;
    }
916817
protected function isOpeningIsolatedDiffTag($item, $currentIsolatedDiffTag = null)
    {
        $tagsToMatch = $currentIsolatedDiffTag !== null
            ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag))
            : $this->config->getIsolatedDiffTags();
        $pattern = '#<%s(\s+[^>]*)?>#iUu';
        foreach ($tagsToMatch as $key => $value) {
            if (preg_match(sprintf($pattern, $key), $item)) {
                return $key;
            }
        }

        return false;
    }
1327875
public function remove($tag)
    {
        if ($this->count() == 0) {
            return [$this, null];
        }

        $deleted = null;

        foreach ($this->items as $key => $element) {
            if ($element === $tag) {
                $this->forget($key);

                $deleted = $tag;

                break;
            }
        }

        return [$this, $deleted];
    }
493262
def remove(self, item):
        
        for index, child in enumerate(self._root.getchildren()):
            if child is item._root:
                del self[index]
                return item
        raise WSDLParseError("Non existing item in tag '%s'" %
                               self._schema.tag)
124448
public function remove($item)
    {
        if (!($item instanceof $this->dataClass)) {
            throw new InvalidArgumentException(
                "HasManyList::remove() expecting a $this->dataClass object, or ID",
                E_USER_ERROR
            );
        }

        // Don't remove item with unrelated class key
        $foreignClass = $this->getForeignClass();
        $classNames = ClassInfo::subclassesFor($foreignClass);
        $classForeignKey = $this->classForeignKey;
        $classValueLower = strtolower($item->$classForeignKey);
        if (!array_key_exists($classValueLower, $classNames)) {
            return;
        }

        // Don't remove item which doesn't belong to this list
        $foreignID = $this->getForeignID();
        $foreignKey = $this->foreignKey;

        if (empty($foreignID)
            || $foreignID == $item->$foreignKey
            || (is_array($foreignID) && in_array($item->$foreignKey, $foreignID))
        ) {
            $item->$foreignKey = null;
            $item->$classForeignKey = null;
            $item->write();
        }
    }
63990
public function removeItem(Item $item)
    {
        if ($this->items->contains($item)) {
            $this->items->removeElement($item);
            $item->setType(null);
        }

        return $this;
    }
168498
public function tagImplode(string $tag, string $sep = ' '): ?string
    {
        return $this->hasTag($tag) ? implode($sep, $this->tags[$tag]) : null;
    }
869797
public static function exist(string $list, string $item, string $separator, string $tag = ''): bool
    {
        $items = self::explode($separator, $list);
        return in_array($tag . $item . $tag, $items);
    }
810374
public function removeElement($tag)
    {
        list($elements, $deleted) = $this->elements->remove($tag);
        $this->elements = $elements;

        return $deleted ? $this : null;
    }
630019
protected function removeItem($item)
    {
        if (is_string($item)) {
            $item = $this->findItem($item);
        }

        echo "    > removing $item->name ...";
        $time = microtime(true);
        $this->authManager->remove($item);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
    }
1128088
function Remove($item)
    {
        $prev = $this->provider->PreviousOf($item);
        $next = $this->provider->NextOf($item);
        if ($next)
        {
            $this->provider->SetPrevious($next, $prev);
        }
        $this->provider->Delete($item);
        if ($next) 
        {
            $this->provider->Save($next);
        }
    }
421350
public static String joinBySeparator( List<String> items, String separator ) {
        int size = items.size();
        if (size == 0) {
            return "";
        }
        StringBuilder sb = new StringBuilder(items.get(0));
        for( int i = 1; i < size; i++ ) {
            sb.append(separator).append(items.get(i));
        }
        return sb.toString();
    }