Update string.utl.php
This commit is contained in:
parent
2be0ba580f
commit
e4efe7358d
|
@ -20,6 +20,27 @@ if(!function_exists("parse_tel_number_kr")) {
|
|||
}
|
||||
}
|
||||
|
||||
if(!function_exists("get_converted_string")) {
|
||||
function get_converted_string($str, $to_charset, $from_charset, $method="iconv") {
|
||||
$output = false;
|
||||
|
||||
switch($method) {
|
||||
case "iconv":
|
||||
if(function_exists("iconv")) {
|
||||
$output = iconv($from_charset, $to_charset, $str);
|
||||
}
|
||||
break;
|
||||
case "mb":
|
||||
if(function_exists("mb_convert_encoding")) {
|
||||
$output = mb_convert_encoding($str, $to_charset, $from_charset);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("nl2p")) {
|
||||
function nl2p($string) {
|
||||
$paragraphs = '';
|
||||
|
|
Loading…
Reference in New Issue
Block a user