diff --git a/src/Http/Request.php b/src/Http/Request.php index 5819e87..ac54e55 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -197,11 +197,6 @@ class Request // QUERY - /** - * @param string $key - * @param mixed $default - * @return mixed - */ public function query_all() { return $_GET; } diff --git a/src/Str.php b/src/Str.php index 37e5465..31777ca 100644 --- a/src/Str.php +++ b/src/Str.php @@ -109,7 +109,7 @@ class Str * @param string $str * @return string */ - public function to_url($str) { + public static function to_url($str) { $str = trim($str); $str = strtolower($str); $str = self::vn2en($str); @@ -125,4 +125,9 @@ class Str return $str; } + + public static function nl2p($text) + { + return str_replace(["\r\n", "\r", "\n"], '
', $text); + } } diff --git a/src/StrReg.php b/src/StrReg.php new file mode 100644 index 0000000..84c9a50 --- /dev/null +++ b/src/StrReg.php @@ -0,0 +1,8 @@ +