SamsonGame/gamectl.d/i18n.php

16 lines
371 B
PHP
Raw Normal View History

2021-12-29 20:50:11 +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;
}