Removes a tag from the TimePoint
@param string $tag
@return TimePoint
13880
public function removeTag($tag)
    {
        $index = array_search($tag, $this->tags);

        if ($index !== false) {
            array_splice($this->tags, $index, 1);
            $this->ref = null;
        }

        return $this;
    }
1369127
def delete_tag(self, tag):
        
        j, r = self.datacenter.request('DELETE', self.path + '/tags/' + tag)
        r.raise_for_status()
390356
public function prune(array $tags)
    {
        $keys = [];

        foreach ($tags as $tag) {
            if (!isset($this->tag2Ids[$tag])) {
                continue;
            }
            $keys = $keys + array_keys($this->tag2Ids[$tag]);
        }

        foreach ($keys as $key) {
            $this->forget($key);
        }

        foreach ($tags as $tag) {
            if (isset($this->tag2Ids[$tag])) {
                unset($this->tag2Ids[$tag]);
            }
        }

        return $this;
    }
462112
private function removeTag($tag)
    {
        try {
            if (isset($this->_hashmap[$tag])) {
                foreach (array_keys($this->_hashmap[$tag]) as $key) {
                    if (\apc_delete($key)) {
                        unset($this->_hashmap[$tag][$key]);
                    }
                }

                return $this->saveHashmap();
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to delete cache for tag %s : %s', $tag, $e->getMessage()));

            return false;
        }

        return true;
    }
652420
public function clearTag(string $tag): void
    {
        // 指定标签清除
        $keys = $this->getTagItems($tag);

        $this->handler->del($keys);

        $tagName = $this->getTagKey($tag);
        $this->handler->del($tagName);
    }
1191801
public function deleteByTags($tag)
    {
        if (!isset($this->tags[$tag])) {
            return false;
        }

        foreach ($this->tags[$tag] as $key) {
            $this->delete($key);
        }

        return true;
    }
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];
    }
1028549
public function prune(array $tags)
    {
        if (!count($tags)) {
            return $this;
        }

        $first = array_shift($tags);
        $query = $this->storage->where('tags', 'like', "%|$first|%");

        foreach ($tags as $tag) {
            $query = $query->orWhere('tags', 'like', "%|$tag|%");
        }

        $deletedIds = [];

        foreach ($query as $cacheId=>$entry) {

            $this->entryCache[$cacheId] = $this->createMissEntry();
            $deletedIds[] = $cacheId;

        }

        $this->writeStorage->clear($deletedIds);

        if ($this->bigStorage) {
            $this->bigStorage->clear($deletedIds);
        }

        return $this;
    }
712194
public function purgeUrlsByTag(string $tag)
    {
        try {
            if ($urls = $this->getTaggedUrls($tag)) {

                $this->purgeUrls(array_values($urls));
                $this->invalidateLocalCache(array_keys($urls));

                return true;
            }
        } catch (Exception $e) {
            \Craft::warning("Failed to purge '$tag'.", "upper");
        }

        return false;
    }
662551
def remove_tag(self, *tag: str):
        
        LOGGER.info('removing tag(s) from repo: %s', tag)

        self.repo.delete_tag(*tag)
117420
public function removeListenersWithTag($tag)
    {
        foreach ($this->listeners as $event => $priorities) {
            $this->clearSortedListeners($event);
            foreach ($priorities as $priority => $listeners) {
                $this->listeners[$event][$priority] = array_filter($listeners, function (TaggableListenerInterface $listener) use ($tag) {
                    return $listener->getTag() !== $tag;
                });
            }
        }

        return $this;
    }
365073
public function removeAttribute( string $attr ): Tag
    {
        if ( isset( $this->attributes[$attr] ) ) {
            unset( $this->attributes[$attr] );
        }

        return $this;
    }
1036992
public function removeTag($tag, $publicIds = array(), $options = array())
    {
        return $this->getUploader()->remove_tag($tag, $publicIds, $options);
    }
822412
function clean($tag) {
		if (isset($this->_tags[$tag])) {
			foreach ($this->_tags[$tag] as $k) { /** @var string $k */
				unset($this->_data[$k]);
			}
			unset($this->_tags[$tag]);
		}
	}
95155
public function delete($tag)
    {
        $this->clearAll();

        $name = $tag;
        if ($tag instanceof Tag) {
            $name = $tag->getName();
        }

        $this->addCommandName(self::TAG_COMMAND);
        $this->addCommandArgument('-d');
        $this->addCommandSubject($name);

        return $this->getCommand();
    }
720330
protected function _nextTaggedLine(&$tag)
    {
        $line = $this->_nextLine();

        // seperate tag from line
        list($tag, $line) = explode(' ', $line, 2);

        return $line;
    }
156813
public function removeByTag($tag)
    {
        $tags = (array) $tag;

        if (0 == count($tags)) {
            return false;
        }

        try {
            $this->_repository
                    ->createQueryBuilder('c')
                    ->delete()
                    ->where('c._tag IN (:tags)')
                    ->setParameters(array('tags' => $this->getContextualTags($tags)))
                    ->getQuery()
                    ->execute();
            $this->resetCacheEntity();
        } catch (\Exception $e) {
            $this->log('warning', sprintf('Enable to remove cache for tags (%s) : %s', implode(',', $tags), $e->getMessage()));

            return false;
        }

        return true;
    }