wrapper method which removes the prefix calls the defined faker method
@param string $replacementId
@return string
333947
public function generateReplacement($replacementId)
    {
        $replacementMethodName = str_replace(self::PREFIX, '', $replacementId);

        if (strpos($replacementMethodName,'->') !== false) {

            $modifierAndMethod = explode('->',$replacementMethodName);
            $modifierName = $modifierAndMethod[0];
            $replacementMethodName = $modifierAndMethod[1];

            $this->validateReplacementConfiguredModifier($modifierName, $replacementMethodName);

            return (string)$this->faker->$modifierName->$replacementMethodName;
        } else {
            $this->validateReplacementConfigured($replacementMethodName);
            return (string)$this->faker->$replacementMethodName;
        }
    }
1330813
public function replaceEnding($search, $replacement)
    {
        return $this->regexReplace
        (
            preg_quote($search, '/').'$',
            UTF8::str_replace('\\', '\\\\', $replacement)
        );
    }
427302
def strip_id_wrapper(code, stdclass)
      prefix = @registry.processors[stdclass].prefix
      code = code.sub(/^#{prefix}\((.+)\)$/, "\\1")
      [prefix, code]
    end
42763
private function slugify($string, $replacement = '-', $lowercase = true)
    {
        $transliterateOptions = $this->transliterateOptions !== null ? $this->transliterateOptions : 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFKC;';
        return (new Slugifier($transliterateOptions, $replacement, $lowercase))->slugify($string);
    }
1343781
protected static function replacePlaceholder(&$str, $uniqid, $index)
	{
		$str = preg_replace_callback(
			'(' . preg_quote($uniqid) . '(.))',
			function ($m) use ($index)
			{
				// Replace with $1 where unambiguous and ${1} otherwise
				if (is_numeric($m[1]))
				{
					return '${' . $index . '}' . $m[1];
				}
				else
				{
					return '$' . $index . $m[1];
				}
			},
			$str
		);
	}
1211575
public function splice($replacement, $offset, $length = null) {
		$offset = $this->prepareOffset($offset);
		$length = $this->prepareLength($offset, $length);

		$start = $this->substring(0, $offset);
		$end = $this->substring($offset + $length);

		return new Text($start . $replacement . $end);
	}
41618
private function makeReplace($output){
		$replaced = $output;

		foreach($this->_direct_replace as $key => $val){
			$needle = '{' . strtoupper(trim($key, '{} ')) . '}';

			$replaced = str_replace($needle, $val, $replaced);
		}

		return $replaced;
	}
176344
public function replacements($replacements = null)
    {
        if (!is_null($replacements)) {
            $this->replacements = $replacements;
        }

        return $this->replacements;
    }
750178
function cleanUserId (userId) {
  if (userId && userId.userId) {
    return cleanUserId(userId.userId)
  }

  return (typeof userId === 'string') ? userId : null
}
537771
public function regexplace($pattern, $replacement)
    {
        $result = preg_replace($pattern, $replacement, $this->getInternalValue());
        $this->setInternalValue($result);

        return $this;
    }
857228
public function scrub($input, $replaceWith = '*')
    {
        return is_array($input) ? $this->cleanArray($input, $replaceWith) : $this->cleanString($input, $replaceWith);
    }
1121689
private function updateArgumentReferences(array $replacements, $definitionId, array $arguments)
    {
        foreach ($arguments as $k => $argument) {
            // Handle recursion step
            if (is_array($argument)) {
                $arguments[$k] = $this->updateArgumentReferences($replacements, $definitionId, $argument);
                continue;
            }
            // Skip arguments that don't need replacement
            if (!$argument instanceof Reference) {
                continue;
            }
            $referenceId = (string) $argument;
            if (!isset($replacements[$referenceId])) {
                continue;
            }
            // Perform the replacement
            $newId = $replacements[$referenceId];
            $arguments[$k] = new Reference($newId, $argument->getInvalidBehavior());
            $this->compiler->addLogMessage($this->formatter->formatUpdateReference($this, $definitionId, $referenceId, $newId));
        }

        return $arguments;
    }
1187336
public static function reconstructNormalizedUrl($url, $prefixId)
    {
        $map = array_flip(self::$urlPrefixMap);

        if ($prefixId !== null && isset($map[$prefixId])) {
            $fullUrl = $map[$prefixId] . $url;
        } else {
            $fullUrl = $url;
        }

        // Clean up host & hash tags, for URLs
        $parsedUrl = @parse_url($fullUrl);
        $parsedUrl = PageUrl::cleanupHostAndHashTag($parsedUrl);
        $url       = UrlHelper::getParseUrlReverse($parsedUrl);

        if (!empty($url)) {
            return $url;
        }

        return $fullUrl;
    }
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]);
            }
        }
    }
1206559
public function splice($offset = 0, $length = 0, $replacement = null)
        {
            $array = $this->get();
            if (null !== $replacement) {
                array_splice($array, $offset, $length, $replacement);
            } else {
                array_splice($array, $offset, $length);
            }
            $this->update($array);
            return $this;
        }
30810
protected function _id($id)
    {
        if (($id !== null) && isset($this->_options['cache_id_prefix'])) {
            return $this->_options['cache_id_prefix'] . $id; // return with prefix
        }
        return $id; // no prefix, just return the $id passed
    }
1025773
private static function reg($callable)
    {
        $id = debug_backtrace()[2]['function'];
        if (! self::getInstance()->offsetExists($id)) {
            self::getInstance()->offsetSet($id, $callable);
        }
        return self::getInstance()->offsetGet($id);
    }