Detranslify
@param string $inString Input string
@return string Detransliterated string
769243
public function detranslify($inString)
    {
        $dirtyResult = str_replace(self::$_EN_ALPHABET, self::$_RU_ALPHABET, $inString);
        return preg_replace(self::$_CORRECTION_PATTERN, self::$_CORRECTION_REPLACEMENT, $dirtyResult);
    }
1234469
public static function Translate( $item, $mapString, $transString )
	{
		if ( $item instanceof Undefined )
		    return "";

		$value = $item . "";
		$result = "";
		for ( $i = 0; $i < strlen( $value ); $i++ )
		{
			if ( ( $mapPos = strpos( $mapString, $value[ $i ] ) ) === false )
			{
				$result .= $value[ $i ];
				continue;
			}

			if ( $mapPos > strlen( $transString ) - 1 ) continue;

			$result .= $transString[ $mapPos ];
		}
		return $result;
	}
226174
public static String deleteAny(String inString, String charsToDelete) {
        if (!hasLength(inString) || !hasLength(charsToDelete)) {
            return inString;
        }

        StringBuilder sb = new StringBuilder(inString.length());
        for (int i = 0; i < inString.length(); i++) {
            char c = inString.charAt(i);
            if (charsToDelete.indexOf(c) == -1) {
                sb.append(c);
            }
        }
        return sb.toString();
    }
622353
public function reverseTransform($out)
    {
        if (null !== $out && is_array($out)) {
            return strtoupper(
                sprintf(
                    '%s%s%s%s%s%s%s%s',
                    $out['c1'],
                    $out['c2'],
                    $out['c3'],
                    $out['c4'],
                    $out['c5'],
                    $out['c6'],
                    $out['c7'],
                    $out['c8']
                )
            );
        }

        return $out;
    }
537218
protected function hideChars($inString, $n1, $n2)
    {
        $inStringLength = strlen($inString);
        if ($inStringLength < ($n1 + $n2)) {
            return $inString;
        }
        $outString = substr($inString, 0, $n1);
        $outString .= substr("********************", 0, $inStringLength - ($n1 + $n2));
        $outString .= substr($inString, - ($n2));
        return $outString;
    }
170762
private static function stringStartsWithNumberFollowedByResource($inString,$resource)
		{
			$followingTextArray = $resource->resourceContent;
			$count = 0;
			
			foreach (str_split($inString) as $character) 
			{
				if(EndBlockFilter::characterIsDigit($character))
				{
					$count++;
				}
				else
				{
					break;
				}
			}
			
			if($count > 0)
			{
				foreach ($followingTextArray as $followingEntry) 
				{
					$formStr = sprintf('%s %s',$count,$followingEntry);
					if (0 === strpos($inString, $formStr)) 
					{
   						return true;
					}
				}
			}
			
			return false;
		}
1141962
protected function translate($string)
    {
        if ($this->hasTranslator()) {
            return $this->getTranslator()->translate($string, $this->getTranslatorTextDomain());
        }

        return $string;
    }
1294161
public static function fromString($documentString)
    {
        $document = new MimeDocument($documentString);

        $lines = explode("\n", $documentString);

        $boundary = false;

        $nextPartLines = [];

        $firstBoundaryFound = false;
        $mimeMessage = "";

        foreach ($lines as $line) {
            $line = trim($line);

            if (!$boundary) {
                if (preg_match("/Content-Type: (multipart\/.+);\s+boundary=\"?([^\"]+)\"?/i", $line, $match)) {
                    $document->boundary = $match[2];
                    $document->setContentType($match[1]);
                    $boundary = $match[2];
                    continue;
                }
            } else {
                if ($line == "--" . $boundary . "--") {
                    $part = MimePart::fromLines($nextPartLines);
                    $document->addPart($part);
                    break;
                }

                if ($line == "--" . $boundary) {
                    if (!$firstBoundaryFound) {
                        $firstBoundaryFound = true;
                    } else {
                        $part = MimePart::fromLines($nextPartLines);
                        $document->addPart($part);
                        $nextPartLines = [];
                    }
                } else {
                    if ($firstBoundaryFound) {
                        $nextPartLines[] = $line;
                    } else {
                        $mimeMessage .= $line . "\r\n";
                    }
                }
            }
        }

        $document->setMessage(trim($mimeMessage));

        return $document;
    }
875300
private function toStringMultiLineString(array $multiLineString)
    {
        $strings = null;

        foreach ($multiLineString as $lineString) {
            $strings[] = '(' . $this->toStringLineString($lineString) . ')';
        }

        return implode(',', $strings);
    }
977137
public function transformWithoutTone($inputChar, $delimiter=' ', $outsideIgnore=true)
    {
        $charWithTone = $this->transformWithTone($inputChar, $delimiter, $outsideIgnore);

        $charWithoutTone = str_replace(
            array('ā', 'á', 'ǎ', 'à', 'ō', 'ó', 'ǒ', 'ò', 'ē', 'é', 'ě', 'è', 'ī', 'í', 'ǐ', 'ì', 'ū', 'ú', 'ǔ', 'ù', 'ǖ', 'ǘ', 'ǚ', 'ǜ', 'ü'), 
            array('a', 'a', 'a', 'a', 'o', 'o', 'o', 'o', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'u', 'u', 'u', 'u', 'v', 'v', 'v', 'v', 'v'),
            $charWithTone
        );

        return $charWithoutTone;

    }
1023083
function fromString( $string )
    {
        $dataType = $this->dataType();
        if ( $dataType )
            return $dataType->fromString( $this, $string );
        else
            return false;
    }
430372
protected function normalizeString($string)
    {
        if (false === strpos($string, '_')) {
            return $string;
        }

        $offset = strspn($string, '_');
        if ($offset) {
            $underscorePrefix = substr($string, 0, $offset);
            $string = substr($string, $offset);
        } else {
            $underscorePrefix = '';
        }

        return $underscorePrefix.parent::normalizeString($string);
    }
753432
public static function convertStringToValues($st)
    {
        if ($st === "TRUE" || $st === "true" || $st === "false" || $st === "FALSE")
            return $st === "TRUE" || $st === "true";
        elseif (is_numeric($st) && preg_match('/\./i', $st))
            return (float)$st;
        elseif (is_numeric($st))
            return (int)$st;

        return $st;
    }
559890
public function transform(string $config = ''): array
    {
        $parsed = [];
        if (!empty($config)) {
            $config = \parse_ini_string($config, true, INI_SCANNER_RAW);
            if (\is_array($config)) {
                $parsed = $this->processNode($config);
            }
        }
        return $parsed;
    }
546350
public function encodeString($sString)
    {
        //If shop is running in UTF-8 nothing to do here
        if ($this->getConfig()->isUtf() === true) {
            return $sString;
        }

        $sShopEncoding = $this->getLanguage()->translateString('charset');
        return iconv('UTF-8', $sShopEncoding, $sString);
    }
1038668
public function transform($string)
    {
        foreach ($this->collection->getTransformers() as $transformer) {
            $string = $transformer->transform($string);
        }
        return $string;
    }
744975
public function convertToString($data) {
		if (!is_string($data)) {
			$data = @json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
			// Removing null byte and double slashes from object properties
			$data = str_replace(['\\u0000', '\\\\'], ["", "\\"], $data);
		}

		return $data;
	}