Removes the last occurrence of the $search text on the $subject.
427301
public static function removeLast(string $subject, string $search, bool $caseSensitive = true): string
    {
        return static::replaceLast($subject, $search, '', $caseSensitive);
    }
585127
public static function replaceFirst($search, $replace, $subject, $caseSensitive = true)
    {
        if ($caseSensitive) {
            $pos = strpos($subject, $search);
        } else {
            $pos = stripos($subject, $search);
        }
        if ($pos !== false) {
            return substr_replace($subject, $replace, $pos, strlen($search));
        }
        return $subject;
    }
297904
public static function replaceFirstOccurrence($search, $replace, $subject)
    {
        if (!$search) {
            return $subject;
        }

        $pos = mb_strpos($subject, $search);
        if ($pos !== false) {
            $subject = static::mb_substr_replace($subject, $replace, $pos, mb_strlen($search));
        }


        return $subject;
    }
992745
function removeThis()
    {
        if ( ($this->objectCount() > 0) or ($this->classCount() > 0) )
        {
            return false;
        }

        $this->remove();

        eZContentCacheManager::clearAllContentCache();

        eZContentLanguage::fetchList( true );

        return true;
    }
64330
def clean_text(self, text, **kwargs):
        """"""
        text = text.replace(" ", "")
        text = text.upper()
        return text
569643
private void removeFromIndexes(Object value, Object key, TransactionContext transactionContext) {
      performSearchWork(value, keyToString(key), WorkType.DELETE, transactionContext);
   }
1159456
protected function strReplace($search, $replace, $subject)
    {
        $template = $this->getTemplateVariable($search);

        return str_replace($template, $replace, $subject);
    }
105163
def _remove_last(votes, fpl, cl, ranking):
    
    for v in votes:
        for r in v:
            if r == fpl[-1]:
                v.remove(r)
    for c in cl:
        if c == fpl[-1]:
            if c not in ranking:
                ranking.append((c, len(ranking) + 1))
106193
def remove_markup (s):
    """"""
    mo = _markup_re.search(s)
    while mo:
        s = s[0:mo.start()] + s[mo.end():]
        mo = _markup_re.search(s)
    return s
496811
protected function replaceLastOne($search, $replace, $subject, $encoding, &$count, &$offset = null, $lenSearch = null)
	{
		$target = mb_substr($subject, 0, $offset, $encoding);
		$position = mb_strrpos($target, $search, 0, $encoding);

		if ($position === false){
			$offset = false;
			return $subject;
		}

		$lenSearch = is_null($lenSearch) ? mb_strlen($search, $encoding) : $lenSearch;

		$start = mb_substr($subject, 0, $position, $encoding);
		$end = $replace.mb_substr($subject, $position+$lenSearch, null, $encoding);

		$offset = -mb_strlen($end, $encoding);
		++$count;

		return $start.$end;
	}
630135
public void clear() {
        queryTextField.clear();
        validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
        validationIcon.setStyleName("hide-status-label");
    }
885702
private String stripSuffix(final String input, final String searchString) {
        final String stripped = input.replace(searchString, "");
        return stripped.trim();
    }
97430
function searchBar_clear()
  {
    var activeElement = this._controller.window.document.activeElement;

    var searchInput = this.getElement({type: "searchBar_input"});
    var cmdKey = utils.getEntity(this.getDtds(), "selectAllCmd.key");
    this._controller.keypress(searchInput, cmdKey, {accelKey: true});
    this._controller.keypress(searchInput, 'VK_DELETE', {});

    if (activeElement)
      activeElement.focus();
  }
484030
def clear(self):
        
        super(XTextEdit, self).clear()
        
        self.textEntered.emit('')
        self.htmlEntered.emit('')
        
        if self.autoResizeToContents():
            self.resizeToContents()
280750
protected function removeLastEventIfOutsideWindowAndNonRecurring()
    {
        $events = $this->cal['VEVENT'];

        if (!empty($events)) {
            $lastIndex = sizeof($events) - 1;
            $lastEvent = $events[$lastIndex];

            if (!isset($lastEvent['RRULE']) || $lastEvent['RRULE'] === '' && $this->doesEventStartOutsideWindow($lastEvent)) {
                $this->eventCount--;

                unset($events[$lastIndex]);
            }

            $this->cal['VEVENT'] = $events;
        }
    }
812019
public void removeSubject(String subject) {
        String prefix = normalizePrefix(subject);

        for (String suffix : getSuffixes(prefix).keySet()) {
            setItem(prefix + suffix, null);
        }
    }
690695
def remove_last_line(self):
        """"""
        editor = self._editor
        text_cursor = editor.textCursor()
        text_cursor.movePosition(text_cursor.End, text_cursor.MoveAnchor)
        text_cursor.select(text_cursor.LineUnderCursor)
        text_cursor.removeSelectedText()
        text_cursor.deletePreviousChar()
        editor.setTextCursor(text_cursor)