first commit

This commit is contained in:
Pavel Shevaev 2022-05-18 09:49:49 +03:00
commit 037a8c065b
1 changed files with 16 additions and 0 deletions

16
i18n.inc.php Normal file
View File

@ -0,0 +1,16 @@
<?php
namespace taskman;
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;
}