Remove index.

@param string $list
@param string|int $index
@param string $separator
@return string
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);
    }
88400
public static function add(string $list, string $item, string $separator, string $tag = ''): string
    {
        $items = self::explode($separator, $list);
        if (!in_array($tag . $item . $tag, $items)) {
            $items[] = $tag . $item . $tag;
        }
        return implode($separator, $items);
    }
224489
public function remove($index) {
        $e = $this->elements[$index];
        unset($this->elements[$index]);
        $this->clean();
        $this->fire(new ListDeleteEvent($e, $index));
        return $e;
    }
634485
public static void removeFromList(List<String> list, String value) {
        int foundIndex = -1;
        int i = 0;
        for (String id : list) {
            if (id.equalsIgnoreCase(value)) {
                foundIndex = i;
                break;
            }
            i++;
        }
        if (foundIndex != -1) {
            list.remove(foundIndex);
        }
    }
260639
public function removeFromIndex($index)
    {
        $index = intval($index);
        if ($this->length() > $index) {
            for ($i = $index + 1; $i < $this->length(); ++$i) {
                if ($this->offsetExists($i)) {
                    $this->offsetUnset($i);
                }
            }
        }
    }
294995
public function removeChildAt($index)
    {

        if (!$this->hasChildAt($index))
            throw new TreeException(
                "Failed to remove child: No child found at $index"
            );

        return $this->removeChild($this->getChildAt($index));
    }
1076872
public function sort($index)
    {
        $this->sort_order = $index->get_parameters('ORDER');

        if (empty($this->raw_data)) {
            return;
        }

        // when sorting search result it's good to make the index smaller
        if ($index->count() != $this->count_messages()) {
            $index->filter($this->get());
        }

        $result  = array_fill_keys($index->get(), null);
        $datalen = strlen($this->raw_data);
        $start   = 0;

        // Here we're parsing raw_data twice, we want only one big array
        // in memory at a time

        // Assign roots
        while (($pos = @strpos($this->raw_data, self::SEPARATOR_ELEMENT, $start))
            || ($start < $datalen && ($pos = $datalen))
        ) {
            $len   = $pos - $start;
            $elem  = substr($this->raw_data, $start, $len);
            $start = $pos + 1;

            $items = explode(self::SEPARATOR_ITEM, $elem);
            $root  = (int) array_shift($items);

            if ($root) {
                $result[$root] = $root;
                foreach ($items as $item) {
                    list($lv, $id) = explode(self::SEPARATOR_LEVEL, $item);
                    $result[$id] = $root;
                }
            }
        }

        // get only unique roots
        $result = array_filter($result); // make sure there are no nulls
        $result = array_unique($result);

        // Re-sort raw data
        $result = array_fill_keys($result, null);
        $start = 0;

        while (($pos = @strpos($this->raw_data, self::SEPARATOR_ELEMENT, $start))
            || ($start < $datalen && ($pos = $datalen))
        ) {
            $len   = $pos - $start;
            $elem  = substr($this->raw_data, $start, $len);
            $start = $pos + 1;

            $npos = strpos($elem, self::SEPARATOR_ITEM);
            $root = (int) ($npos ? substr($elem, 0, $npos) : $elem);

            $result[$root] = $elem;
        }

        $this->raw_data = implode(self::SEPARATOR_ELEMENT, $result);
    }
508899
public static function remove($removeList = array())
    {
        if (!is_array($removeList)) {
            $removeList = array($removeList);
        }
        foreach ($removeList as $value) {
            if (!empty($value)) {
                if (is_dir($value)) {
                    self::deleteDirectory($value);
                }
                if (is_file($value)) {
                    unlink($value);
                }
            }
        }
        return true;
    }
186708
public function deleteMarker($index = null)
	{
		$markers = $this->listMarkers();

		if ($index === null)
		{
			$index = count($markers) - 1;
		}

		if ($index >= count($markers) || $index < 0)
		{
			throw new OutOfBoundsException('Marker index out of bounds.');
		}

		$marker = $markers[$index];
		unset($markers[$index]);
		$markers = array_values($markers);
		$this->setOption('markers', $markers);

		return $marker;
	}
89548
public static function pos(string $list, string $item, string $separator, string $tag = ''): int
    {
        $items = self::explode($separator, $list);
        $pos = array_search($tag . $item . $tag, $items);
        if ($pos === false) {
            $pos = -1;
        }
        return $pos;
    }
1061825
public Integer remove(
        @DoNotSub final int index)
    {
        checkIndex(index);

        final int value = elements[index];

        @DoNotSub final int moveCount = size - index - 1;
        if (moveCount > 0)
        {
            System.arraycopy(elements, index + 1, elements, index, moveCount);
        }

        size--;

        return value;
    }
393578
public static function merge(
        string $list1,
        string $list2,
        bool $sort,
        string $separator,
        string $tag = ''
    ): string {
        $items1 = self::explode($separator, $list1);
        $items2 = self::explode($separator, $list2);
        if (count($items2) > 0) {
            foreach ($items2 as $item) {
                if (!in_array($item, $items1)) {
                    $items1[] = $item;
                }
            }
        }
        if ($sort) {
            sort($items1);
        }
        return implode($separator, $items1);
    }
275623
public function remove($index) {
        $element = $this->get($index);
        if (!is_null($element)) { array_splice($this->_elements, $index, 1); }
        return $element;
    }
652449
public function deleteRecord($index)
    {
        if (isset($this->records[$index])) {
            $this->fileLength -= ($this->records[$index]->getContentLength() + 4);
            $count = count($this->records) - 1;
            for ($i = $index; $i < $count; ++$i) {
                $this->records[$i] = $this->records[$i + 1];
            }
            unset($this->records[count($this->records) - 1]);
            $this->_deleteRecordFromDBF($index);
        }
    }
1144073
public static function removeFirst(string $string, string $separator): string
    {
        $string = explode($separator, $string);
        $string = Arr::removeFirst($string);
        return implode($separator, $string);
    }
153949
public Object remove(int index) {
    Object o = opt(index);
    this.myArrayList.remove(index);
    return o;
  }
1192177
public static function rest($collection = null, $index = null)
    {
        if (is_null($index)) {
            $index = 1;
        }
        return array_splice($collection, $index);
    }