aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Fallback.php
diff options
context:
space:
mode:
authorSam Reed <reedy@users.mediawiki.org>2011-05-28 18:58:51 +0000
committerSam Reed <reedy@users.mediawiki.org>2011-05-28 18:58:51 +0000
commit2b676156ba252dcb39aa90b65799defeb727cf1c (patch)
tree1c7a66ae7558cd107cb4f3ab9070c450b495dbb1 /includes/Fallback.php
parent93b8ff3a101bb730a98a7d2f33cf26c7225d397e (diff)
downloadmediawikicore-2b676156ba252dcb39aa90b65799defeb727cf1c.tar.gz
mediawikicore-2b676156ba252dcb39aa90b65799defeb727cf1c.zip
And even more documentation
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89061
Diffstat (limited to 'includes/Fallback.php')
-rw-r--r--includes/Fallback.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/includes/Fallback.php b/includes/Fallback.php
index 81ca6ad19c2a..2cca1e818497 100644
--- a/includes/Fallback.php
+++ b/includes/Fallback.php
@@ -37,8 +37,8 @@ class Fallback {
return utf8_encode( $string );
}
return $string;
- }
-
+ }
+
/**
* Fallback implementation for mb_substr, hardcoded to UTF-8.
* Attempts to be at least _moderately_ efficient; best optimized
@@ -48,8 +48,14 @@ class Fallback {
* Larger offsets are still fairly efficient for Latin text, but
* can be up to 100x slower than native if the text is heavily
* multibyte and we have to slog through a few hundred kb.
+ *
+ * @param $str
+ * @param $start
+ * @param $count string
+ *
+ * @return string
*/
- public static function mb_substr( $str, $start, $count='end' ) {
+ public static function mb_substr( $str, $start, $count = 'end' ) {
if( $start != 0 ) {
$split = self::mb_substr_split_unicode( $str, intval( $start ) );
$str = substr( $str, $split );