From 3e9d2b8ae82948de3c83bd5a50151949f6e6ca90 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 27 Oct 2012 14:28:51 +0300 Subject: Docblock improvements --- system/core/Utf8.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'system/core/Utf8.php') diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 1ff02981b..bc7afed91 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -39,9 +39,9 @@ class CI_Utf8 { /** - * Constructor + * Class constructor * - * Determines if UTF-8 support is to be enabled + * Determines if UTF-8 support is to be enabled. * * @return void */ @@ -87,9 +87,11 @@ class CI_Utf8 { /** * Clean UTF-8 strings * - * Ensures strings are UTF-8 + * Ensures strings contain only valid UTF-8 characters. * - * @param string + * @uses CI_Utf8::_is_ascii() Decide whether a conversion is needed + * + * @param string $str String to clean * @return string */ public function clean_string($str) @@ -109,9 +111,9 @@ class CI_Utf8 { * * Removes all ASCII control characters except horizontal tabs, * line feeds, and carriage returns, as all others can cause - * problems in XML + * problems in XML. * - * @param string + * @param string $str String to clean * @return string */ public function safe_ascii_for_xml($str) @@ -124,11 +126,11 @@ class CI_Utf8 { /** * Convert to UTF-8 * - * Attempts to convert a string to UTF-8 + * Attempts to convert a string to UTF-8. * - * @param string - * @param string input encoding - * @return string + * @param string $str Input string + * @param string $encoding Input encoding + * @return string $str encoded in UTF-8 or FALSE on failure */ public function convert_to_utf8($str, $encoding) { @@ -149,9 +151,9 @@ class CI_Utf8 { /** * Is ASCII? * - * Tests if a string is standard 7-bit ASCII or not + * Tests if a string is standard 7-bit ASCII or not. * - * @param string + * @param string $str String to check * @return bool */ protected function _is_ascii($str) -- cgit v1.2.3-24-g4f1b From 31b7c339a1ffda23d9ad288e294fbde5e7e22f70 Mon Sep 17 00:00:00 2001 From: vkeranov Date: Sat, 27 Oct 2012 18:09:46 +0300 Subject: Remove extra new lines --- system/core/Utf8.php | 1 - 1 file changed, 1 deletion(-) (limited to 'system/core/Utf8.php') diff --git a/system/core/Utf8.php b/system/core/Utf8.php index bc7afed91..efe3c10dc 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -64,7 +64,6 @@ class CI_Utf8 { define('MB_ENABLED', FALSE); } - if ( @preg_match('/./u', 'é') === 1 // PCRE must support UTF-8 && function_exists('iconv') // iconv must be installed -- cgit v1.2.3-24-g4f1b