aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/mb_wrapper.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-15 04:41:46 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-15 04:41:46 +0000
commit54a3c3e7e9e70c4770010e442e95f734200d03f9 (patch)
treef8e2e7e383523bbf28654ec171e57c841ed1910b /engine/lib/mb_wrapper.php
parentba331497c03a51ae4b46b387e5f6773620a98cff (diff)
downloadelgg-54a3c3e7e9e70c4770010e442e95f734200d03f9.tar.gz
elgg-54a3c3e7e9e70c4770010e442e95f734200d03f9.tar.bz2
Standardized gobs of files.
git-svn-id: http://code.elgg.org/elgg/trunk@3548 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/mb_wrapper.php')
-rw-r--r--engine/lib/mb_wrapper.php113
1 files changed, 56 insertions, 57 deletions
diff --git a/engine/lib/mb_wrapper.php b/engine/lib/mb_wrapper.php
index 6221f4aa1..2cef15c64 100644
--- a/engine/lib/mb_wrapper.php
+++ b/engine/lib/mb_wrapper.php
@@ -1,62 +1,61 @@
<?php
- /**
- * Elgg wrapper functions for multibyte string support.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
+/**
+ * Elgg wrapper functions for multibyte string support.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
- /**
- * Wrapper function: Returns the result of mb_strtolower if mb_support is present, else the
- * result of strtolower is returned.
- *
- * @param string $string The string.
- * @param string $charset The charset (if multibyte support is present) : default 'UTF8'
- * @return string
- */
- function elgg_strtolower($string, $charset = 'UTF8')
- {
- if (is_callable('mb_strtolower'))
- return mb_strtolower($string, $charset);
-
- return strtolower($string);
+/**
+ * Wrapper function: Returns the result of mb_strtolower if mb_support is present, else the
+ * result of strtolower is returned.
+ *
+ * @param string $string The string.
+ * @param string $charset The charset (if multibyte support is present) : default 'UTF8'
+ * @return string
+ */
+function elgg_strtolower($string, $charset = 'UTF8') {
+ if (is_callable('mb_strtolower')) {
+ return mb_strtolower($string, $charset);
}
-
- /**
- * Wrapper function: Returns the result of mb_strtoupper if mb_support is present, else the
- * result of strtoupper is returned.
- *
- * @param string $string The string.
- * @param string $charset The charset (if multibyte support is present) : default 'UTF8'
- * @return string
- */
- function elgg_strtoupper($string, $charset = 'UTF8')
- {
- if (is_callable('mb_strtoupper'))
- return mb_strtoupper($string, $charset);
-
- return strtoupper($string);
+
+ return strtolower($string);
+}
+
+/**
+ * Wrapper function: Returns the result of mb_strtoupper if mb_support is present, else the
+ * result of strtoupper is returned.
+ *
+ * @param string $string The string.
+ * @param string $charset The charset (if multibyte support is present) : default 'UTF8'
+ * @return string
+ */
+function elgg_strtoupper($string, $charset = 'UTF8') {
+ if (is_callable('mb_strtoupper')) {
+ return mb_strtoupper($string, $charset);
}
-
- /**
- * Wrapper function: Returns the result of mb_substr if mb_support is present, else the
- * result of substr is returned.
- *
- * @param string $string The string.
- * @param int $start Start position.
- * @param int $length Length.
- * @param string $charset The charset (if multibyte support is present) : default 'UTF8'
- * @return string
- */
- function elgg_substr($string, $start = 0, $length = null, $charset = 'UTF8')
- {
- if (is_callable('mb_substr'))
- return mb_substr($string, $start, $length, $charset);
-
- return substr($string, $start, $length);
+
+ return strtoupper($string);
+}
+
+/**
+ * Wrapper function: Returns the result of mb_substr if mb_support is present, else the
+ * result of substr is returned.
+ *
+ * @param string $string The string.
+ * @param int $start Start position.
+ * @param int $length Length.
+ * @param string $charset The charset (if multibyte support is present) : default 'UTF8'
+ * @return string
+ */
+function elgg_substr($string, $start = 0, $length = null, $charset = 'UTF8') {
+ if (is_callable('mb_substr')) {
+ return mb_substr($string, $start, $length, $charset);
}
-
- // TODO: Other wrapper functions
-?> \ No newline at end of file
+
+ return substr($string, $start, $length);
+}
+
+// TODO: Other wrapper functions \ No newline at end of file