static function propertiesToString($h) { $sb = new StringBuf(); $iter = $h->keys(); $keys = new _hx_array(array()); while ($iter->hasNext()) { $keys->push($iter->next()); } $i = null; $j = null; $n = $keys->length; $_g = 0; while ($_g < $n) { $i1 = $_g++; $_g1 = $i1 + 1; while ($_g1 < $n) { $j1 = $_g1++; $s1 = $keys[$i1]; $s2 = $keys[$j1]; if (com_wiris_util_sys_IniFile::compareStrings($s1, $s2) > 0) { $keys[$i1] = $s2; $keys[$j1] = $s1; } unset($s2, $s1, $j1); } unset($_g1); unset($i1); } $_g = 0; while ($_g < $n) { $i1 = $_g++; $key = $keys[$i1]; $sb->add($key); $sb->add("="); $value = $h->get($key); $value = str_replace("\\", "\\\\", $value); $value = str_replace("\n", "\\n", $value); $value = str_replace("\r", "\\r", $value); $value = str_replace("\t", "\\t", $value); $sb->add($value); $sb->add("\n"); unset($value, $key, $i1); } return $sb->b; }