hellbound/gamectl.d/i18n.php

16 lines
371 B
PHP
Raw Permalink Normal View History

2021-11-26 11:16:25 +03:00
<?php
function i18n_decode_string($str)
{
return preg_replace(array("/\\\\\"/", "/\\\\r/", "/\\\\n/", "/\\\\t/"), array("\"", "\r", "\n", "\t"), $str);
}
function i18n_encode_string($str)
{
$str = str_replace("\n", '\n', $str);
$str = str_replace("\r", '\r', $str);
$str = str_replace("\t", '\t', $str);
$str = str_replace("\"", '\"', $str);
return $str;
}